You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider publishing the Rust code in this repo as a crate #178
We have a need to generate Python component bindings from a Typescript application. I've been able to do that by building the Rust code in this repository and using jco to create TS bindings for it (see below). But that requires vendoring the Rust code or generated WASM binary in our application. If the core Rust code in this repo were published as a crate we could use Cargo to handle the dependency management with less worries about keeping the wasmtime-py module up to date.
Would it be possible to use a git dependency on this repository? From a Cargo dependency perspective I think that should work, and it would likely entail exporting a few things, but that should be ok
A git dependency would be a bit tough for our use-case since we will be providing this to end users and would prefer to always be pinned to an explicit release. One of my more python savvy teammates suggested using pip and pulling the wasm module out of the downloaded zip, so that should work for our purposes at the moment. But long term would love to see all the binding generators published separately from their primary language bindings!
Apologies for the lack of reply, just getting back around to this as some other work took me away from it.
We ended up combining your suggestion of a GH dependency + the tag targeting with the (nightly) artifact dependencies cargo feature to get something working.
Would still like to see the crates published to crates.io to keep things in step with the rest of the ecosystem (ex: js-component-bindgen) and to enable publishing other crates that rely on wasmtime-py.
Activity
alexcrichton commentedon Sep 5, 2023
Would it be possible to use a git dependency on this repository? From a Cargo dependency perspective I think that should work, and it would likely entail exporting a few things, but that should be ok
landonxjames commentedon Sep 7, 2023
A git dependency would be a bit tough for our use-case since we will be providing this to end users and would prefer to always be pinned to an explicit release. One of my more python savvy teammates suggested using
pipand pulling the wasm module out of the downloaded zip, so that should work for our purposes at the moment. But long term would love to see all the binding generators published separately from their primary language bindings!alexcrichton commentedon Sep 13, 2023
For the pinning, would tags perhaps work out? Either that or specific revisions (or having a
Cargo.lock) would suffice for pinning things.I'm not 100% sure what your build system and integration would look like however, so I could easily be missing something.
landonxjames commentedon Nov 10, 2023
Apologies for the lack of reply, just getting back around to this as some other work took me away from it.
We ended up combining your suggestion of a GH dependency + the tag targeting with the (nightly) artifact dependencies cargo feature to get something working.
Would still like to see the crates published to crates.io to keep things in step with the rest of the ecosystem (ex: js-component-bindgen) and to enable publishing other crates that rely on wasmtime-py.
Delete `wasmtime.loader` and `wasmtime.bindgen`
Delete `wasmtime.loader` and `wasmtime.bindgen` (bytecodealliance#310)