CGamesPlay requested fitzgen for a review on PR #8907.
CGamesPlay requested wasmtime-core-reviewers for a review on PR #8907.
CGamesPlay opened PR #8907 from CGamesPlay:main
to bytecodealliance:main
:
This creates an API to allow cloning references to wasm_engine_t in the C API. This is simple in the Rust API which implements Clone, however it is not exposed to the C API.
Use case: in tree-sitter's wasm support, we create a store object and want to instantiate modules into it over the course of the object's lifetime. This requires a handle to the underlying engine, which means our store must be kept alongside a reference to the engine (since tree-sitter is a library, it doesn't want to assume a global wasm engine). This currently requires transferring ownership of the engine to the tree sitter store container, which means we can't reuse engine objects between multiple stores.
This pertains to https://github.com/tree-sitter/tree-sitter/issues/3454.
alexcrichton submitted PR review.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Good catch! We'll need to update this documentation further nowadays because some headers are generated as part of the build now so CMake is primarily needed to get the headers right.
alexcrichton created PR review comment:
Could the documentation be updated here to indicate that
wasm_engine_delete
must be called on the returned reference?
CGamesPlay updated PR #8907.
alexcrichton submitted PR review.
alexcrichton merged PR #8907.
av1934413 submitted PR review.
av1934413 created PR review comment:
274df2d52a8568f99e608f59046b20a948a15dea
Last updated: Dec 23 2024 at 12:05 UTC