Expose exceptions proposal configuration on C API#11861
Expose exceptions proposal configuration on C API#11861alexcrichton merged 4 commits intobytecodealliance:mainfrom
Conversation
|
Thanks for the PR! This is actually missing the Rust-side implementation, though, for example a copy of this function. While the C API builds the error would come about when an external embedding (e.g. wasmtime-py) would lookup the symbol and that would fail. If you'd like you could add a test too which wuold expose the linking failure, but this is a pretty minor function so it's also ok to skip the test. |
|
Oh, thanks for the quick reply—and sorry about the omissions. 🙏 I added the missing setter functions in 33efd6b and a small use case for a smoke test in b533a96. I also found the doc and ran a test—it seems to work well! Test resultAnd it works with wasmtime-py, too! 🎉 For the comparison, current release cannot handle that. |
alexcrichton
left a comment
There was a problem hiding this comment.
No worries, and this all looks great, thanks!
…1861) * c-api: expose exceptions configuration option to c api * chore: Fix lint error * fix: Add missing implementation of exceptions proposal config setter function on rust side * feat: Add use cases on smoke test
Noticed while reviewing another docs update: we still state that the exceptions proposal is not fuzzed, and has no C API support. Neither is true anymore, AFAIK: - We fuzz exceptions via our usual infrastructure and we had a number of fuzzbugs come in when we first merged support. - We added C API support for enabling exceptions in bytecodealliance#11861.
* Docs: update exceptions proposal fuzzing and C-API status. Noticed while reviewing another docs update: we still state that the exceptions proposal is not fuzzed, and has no C API support. Neither is true anymore, AFAIK: - We fuzz exceptions via our usual infrastructure and we had a number of fuzzbugs come in when we first merged support. - We added C API support for enabling exceptions in #11861. * Review feedback.
This PR makes wasmtime exceptions configuration available through the C API.
The goal is to let downstream bindings like wasmtime-py configure exceptions proposal directly. (Yeah, That's what I'm trying to do 😋)
This is similar in spirit to #7811, which also added configuration.
Verified that the new API compiles and links correctly via the C API build (
cargo build --release --manifest-path crates/c-api/Cargo.toml).