-
Notifications
You must be signed in to change notification settings - Fork 17
feat/wasm emscripten target #171
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
base: main
Are you sure you want to change the base?
Conversation
I am glad you found a way to make a PR from this. Could you rebase it onto the latest |
0b143e4
to
952fccf
Compare
@maartenflippo freshly force pushed 👍 edit it's correct again now ! |
Ah, I came across this forum thread https://users.rust-lang.org/t/emitting-es6-module-for-wasm32-unknown-emscripten/84684 It also produces an output that is incompatible with Perhaps it's not the right choice after all. 😞 That said, to the contrary there is active work to support emscripten in wasm-bindgen! rustwasm/wasm-bindgen#4443 So on that grounds I would suggest this is acceptable, and may even soon become more useful :-) |
It looks like emscripten disables exceptions by default, and maxsat-checker.cc file uses them, so the build script should pass the |
I got a working hello world! :-) https://github.com/lmmx/pumpkin-web |
That is very nice to see. I will ask a few more things before we merge this:
Finally, make sure to double-check the changes. At the moment this PR changes the version of the |
Hello again! Returning to ship this, so the CI will just need to: rustup target add wasm32-unknown-emscripten
cargo build -p pumpkin-solver --target wasm32-unknown-emscripten --release I forgot it was just the solver package I built last time and was wondering why it was erroring - the PyO3 part is incompatible for the record, but I think building just the one package suffices. I enabled running this on my fork but it won't for some reason Oh and to answer your 3 points:
|
@@ -1,6 +1,6 @@ | |||
[package] | |||
name = "pumpkin-solver" | |||
version = "0.2.0" | |||
version = "0.1.4" |
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.
The versioning is incorrect when compared to the current main
once_cell = "1.19.0" | ||
downcast-rs = "1.2.1" | ||
drcp-format = { version = "0.2.1", path = "../drcp-format" } | ||
drcp-format = { version = "0.2.0", path = "../drcp-format" } |
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.
Also here please
@@ -27,6 +27,9 @@ use pumpkin_solver::results::SatisfactionResult; | |||
use pumpkin_solver::results::SolutionReference; | |||
use pumpkin_solver::statistics::StatisticLogger; | |||
use pumpkin_solver::termination::Combinator; | |||
#[cfg(target_arch = "wasm32")] | |||
use pumpkin_solver::termination::Indefinite as OsSignalReplacement; |
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.
The naming here is a bit confusing; Indefinite
is fine here
This is a PR of 1 commit on top of https://github.com/ConSol-Lab/Pumpkin/tree/feat/support-webassembly by @maartenflippo as discussed in #161 (comment)
wasm32-unknown-emscripten
target to provide C headers needed to build WebAssemblyUpdate: rebased as requested