Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify Wasm usage #964

Open
crandmck opened this issue Mar 12, 2025 · 1 comment
Open

Clarify Wasm usage #964

crandmck opened this issue Mar 12, 2025 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@crandmck
Copy link
Collaborator

Copying some comments on #958 to here:

It would be great to add a sentence or two about WHY one would want to build Wasm.
Also, is building Wasm required? If so, why? If one can omit it, how?

There are many supported LLVM targets for this crate and we don't have any language indicating why you would compile for them.

That's a good point. Perhaps we should! The docs don't currently mention LLVM at all, so we should add that, too.

We assume that most people who are using Python, C, or Node would use the libraries we create (from the Rust bindings), so they may not understand in what situations Wasm is required. Is it ONLY required if you're creating language bindings? Is it required for building the C library (for Python, Node, and client JS, you don't build, you just install a prebuilt package). Is it required for non-JS languages?

I admit I don't understand this clearly, and I suspect our users will be in the same boat.

The user will necessarily have a use case outside the scope of this crate and know which target to compile for. No one has to compile for any target if they don't want to.

Perhaps, but the more we can explain the better, especially since there are certainly many people without extensive experience with Rust who might want to at least understand their options.

Also, IIUC, one can use c2pa-rs directly (i.e. not for another language binding), e.g. if you want to call into Rust using the Foreign Function Interface (FFI). Maybe I'm misunderstanding.

I think we just need to explain the relationship between Wasm and c2pa-rs, because we only mention it in passing atm and it's likely to be more confusing than helpful.

@crandmck crandmck self-assigned this Mar 12, 2025
@crandmck crandmck added the documentation Improvements or additions to documentation label Mar 12, 2025
@cdmurph32
Copy link
Collaborator

From @gpeacock
#958 (comment)

Note that make test has always tried to build wasm, and that will no longer work on macs without installing llvm. We may want to reconfigure this and make wasm/wasi builds as separate step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants