-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Update the C API with module linking support #2472
Update the C API with module linking support #2472
Conversation
This updates the Python extension with the API support added in bytecodealliance/wasmtime#2472. Most of the changes here were pretty straightforward!
It's worth noting that I tested this against bytecodealliance/wasmtime-py#47 as well to ensure it doesn't at least immediately segfault. |
Subscribe to Label Actioncc @peterhuene
This issue or pull request has been labeled: "wasmtime:c-api"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
This commit does everything necessary (ideally) to support the module linking proposal in the C API. The changes here are: * New `wasm_{module,instance}type_t` types and accessors * New `wasm_{module,instance}_type` functions * Conversions between `wasm_extern_t` and `wasm_{instance,module}_t`, as well as `wasm_externtype_t` and the new types. * Addition of `WASM_EXTERN_{MODULE,INSTANCE}` constants * New `wasm_config_t` modifier to enable/disable module linking With these functions it should be possible to pass instances/modules to instances and also acquire them from exports. Altogether this should enable everything for module linking. An important point for this is that I've opted to add all these items under the `wasm_*` name prefix instead of `wasmtime_*`. I've done this since they're all following the idioms of existing APIs and while not standard the intention would be to standardize them (unlike many other Wasmtime-specific APIs). cc bytecodealliance#2094
e8bd432
to
c3a1427
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I'll file an issue in the .NET repo for ingesting these changes.
This updates the Python extension with the API support added in bytecodealliance/wasmtime#2472. Most of the changes here were pretty straightforward!
This commit binds the support added in bytecodealliance/wasmtime#2472 to bring support for the module linking to this Go extension. The support here is similar to bytecodealliance/wasmtime-py#47, which is hooking up modules/instances to `Extern` as well as adding dedicated instance/module types.
* Implement module linking proposal This commit binds the support added in bytecodealliance/wasmtime#2472 to bring support for the module linking to this Go extension. The support here is similar to bytecodealliance/wasmtime-py#47, which is hooking up modules/instances to `Extern` as well as adding dedicated instance/module types. * Update bazel build * Try to fix a Windows CI issue
* Implement module linking proposal This commit binds the support added in bytecodealliance/wasmtime#2472 to bring support for the module linking to this Go extension. The support here is similar to bytecodealliance/wasmtime-py#47, which is hooking up modules/instances to `Extern` as well as adding dedicated instance/module types. * Update bazel build * Try to fix a Windows CI issue
This commit does everything necessary (ideally) to support the module
linking proposal in the C API. The changes here are:
wasm_{module,instance}type_t
types and accessorswasm_{module,instance}_type
functionswasm_extern_t
andwasm_{instance,module}_t
, aswell as
wasm_externtype_t
and the new types.WASM_EXTERN_{MODULE,INSTANCE}
constantswasm_config_t
modifier to enable/disable module linkingWith these functions it should be possible to pass instances/modules to
instances and also acquire them from exports. Altogether this should
enable everything for module linking.
An important point for this is that I've opted to add all these items
under the
wasm_*
name prefix instead ofwasmtime_*
. I've done thissince they're all following the idioms of existing APIs and while not
standard the intention would be to standardize them (unlike many other
Wasmtime-specific APIs).
cc #2094