-
Notifications
You must be signed in to change notification settings - Fork 5
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
build.rs
doesn't support wasm
family architecture
#3
Comments
@simbleau, thank you for reporting. This shouldn't be too hard to fix since we already support wasm. I'll try to fix this next week. It's likely that we're missing some flags. |
Since we're using C++ stdlib in the C++ runtime, it seems like we'll need to use emscripten to compile the runtime then link it with |
Hello! I am in the same situation where I am trying to compile a Bevy app to WASM. Any updates to this? |
Building Then, linking with other |
I don't think this should be closed @dragostis. Most rust developers who work with Perhaps this issue should be closed when it's appropriately documented how to run this on web. |
I think plug-and-play compatibility with
Also, for |
This might be a stupid question, but does it really need to be compiled with the Rust toolchain? I thought one of the benefits and goals of WASM was to be able to distribute binaries that had a defined ABI and would run ubiquitously. I would be very happy with prebuilt C++ distributed as part of the Rust-packages as an alternative if that is possible. Also, I second the comment above. This might well work with Bevy, but at the moment I don't understand how to do it to WASM with Bevy and that is the only target I am currently interested in, so to me, Rive is not an option right now. This could be mitigated with documentation. |
I was under the impression that simply building Building a Bevy project with Re-opening the issue, but I currently don't have any leads/ideas. |
What's the potential for a Rust-native runtime? I really hate to be "that guy" but this Bevy runtime is pretty much unusable for anyone who wants to get this on web. :( |
@simbleau, I just pushed to an experimental branch using emscripten's libcxx implementation. Could you please check to see if it works? |
Sure, should I get some bandwidth... not today, but soon, hopefully. :) |
Unfortunately, the solution doesn't work because |
There is a rive-wasm api (https://github.com/rive-app/rive-wasm). Any thought to using that for wasm and rive-cpp for native? |
This is an idea worth looking into. |
Using |
The build.rs script heavily relies on by C++, which is OK (not ideal) but doesn't seem to be configured correctly for the wasm architecture.
If you attempt to build rive-rs for wasm (at least on MacOS M1), you'll end up with this:
Output:
I've tried adjusting the
.include
s in thebuild.rs
but have been fighting uphill battles.Wondering if there's a priority to support wasm32 or have a pure-rust parser akin to rive-cpp? I would imagine this (web) is the primary supported for rive, so this should probably be considered a bug.
The text was updated successfully, but these errors were encountered: