Skip to content

How can you link a Rust library with a C app into one WASM file? #17294

Answered by tlively
curiousdannii asked this question in Q&A
Discussion options

You must be logged in to vote

To produce a Rust .a file, set the crate-type field to staticlib in your cargo.toml: https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-crate-type-field

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@tlively
Comment options

Answer selected by curiousdannii
@curiousdannii
Comment options

@curiousdannii
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants