bartbes opened PR #11327 from bartbes:fix-wrong-c-api-declaration to bytecodealliance:main:
I was trying to use the C api and could not figure out how to implement a finalizer that takes no arguments. Turns out, the c declaration simply did not match the rust implementation.
See the rust specification of
finalizerhere:
https://github.com/bytecodealliance/wasmtime/blob/d2f51186ffb9fd2110d8658f215922b8398dd491/crates/c-api/src/component/linker.rs#L105-L112
extern "C" fn(*mut c_void)>of course matchesvoid(*)(void*), notvoid(*)().
bartbes requested alexcrichton for a review on PR #11327.
bartbes requested wasmtime-core-reviewers for a review on PR #11327.
alexcrichton submitted PR review:
Thanks!
alexcrichton merged PR #11327.
Last updated: Dec 06 2025 at 07:03 UTC