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

Questions about c-api #10114

Open
mihaly-sisak opened this issue Jan 25, 2025 · 0 comments
Open

Questions about c-api #10114

mihaly-sisak opened this issue Jan 25, 2025 · 0 comments

Comments

@mihaly-sisak
Copy link

Hello all!
This is my first time touching Rust code and I feel a little bit lost.
I am more familiar with C so I wanted to give the c-api a try.
I found these tutorials: https://docs.wasmtime.dev/examples-c-gcd.html

However, I ran into an error. I did not have wasmtime_wat2wasm defined.
I stumbled upon WASMTIME_FEATURE_LIST.
I managed to fix this by adding wat = ["dep:wat", "wasmtime/wat"] to crates/c-api/Cargo.toml, adding "WAT", to crates/c-api/build.rs, and compiling with cargo build --release --package wasmtime-c-api --features wasmtime-c-api/wat.

What is the expected action if I want to enable/disable features? Do I need to modify build.rs, Cargo.toml and features.cmake to match? Or is it supposed to be matching automatically and I am just so new to cargo that I cant figure it out?

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

No branches or pull requests

1 participant