-
Notifications
You must be signed in to change notification settings - Fork 45
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
Explore use of wasm-bindgen instead of stdweb #329
Comments
Thanks - we'd been unofficially talking about this being inevitable but having an issue makes it official! I was able to get the start going on a proof of concept of a move over to bindgen over a couple weekends a while back (and came across the same string struggles, as you'll see) over in the bindgen branch, and just haven't had the time to push further forward in getting all the interfaces implemented. There's a pretty hefty bit of implementation work still to go, plus adapting cargo-screeps, but I was pretty happy with the experience working with bindgen so far - it seems like it won't be too painful to make the move happen. If you're interested, here's the notes that I have on getting started with the bindgen builds which just implements a couple basic game interfaces and game object types at the moment. I'm hoping to have some more time to work on the conversion before too long, but if you're inclined, PRs against the bindgen branch would be welcome. |
Note that rustwasm/wasm-bindgen#2310 would reduce the amount of changes we need to make to the generated file. |
I am all for this. I want to use console_error_panic_hook to get proper error messages and be able to panic again when something fails unexpectedly. It unfortunately fails to compile as some dependencies need the newer toolchain. Overall I see a lot of potential to fix a lot of inconvenient bugs. |
The
wasm-bindgen
toolchain is much better supported thanstdweb
and is the "official" way to call into JS from Rust. As seen in #288,stdweb
andcargo-web
don't see a lot of attention. Thegerandom
/rand
crates also had to disable testing forcargo-web
due to lack of upstream support.The issue screeps/screeps#120 and this feature request descirbe the necessary first steps to supporting
wasm-bindgen
.The text was updated successfully, but these errors were encountered: