Stream: git-wasmtime

Topic: wasmtime / PR #11327 Fix declaration of c-api function wa...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 26 2025 at 09:50):

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 finalizer here:
https://github.com/bytecodealliance/wasmtime/blob/d2f51186ffb9fd2110d8658f215922b8398dd491/crates/c-api/src/component/linker.rs#L105-L112

extern "C" fn(*mut c_void)> of course matches void(*)(void*), not void(*)().

view this post on Zulip Wasmtime GitHub notifications bot (Jul 26 2025 at 09:50):

bartbes requested alexcrichton for a review on PR #11327.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 26 2025 at 09:50):

bartbes requested wasmtime-core-reviewers for a review on PR #11327.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 26 2025 at 21:10):

alexcrichton submitted PR review:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Jul 26 2025 at 21:34):

alexcrichton merged PR #11327.


Last updated: Dec 06 2025 at 07:03 UTC