Skip to content
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

Add option to compile salva2d with wasm-bindgen #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

willcrichton
Copy link

Right now, salva2d only compiles with stdweb. Future momentum seems to be moving towards wasm-bindgen, so adding support like e.g. nphysics has seems natural.

I followed the same strategy used in nphysics (see their Cargo.toml). By default, the salva crate uses stdweb to preserve compatibility. A user of salva can switch to wasm-bindgen like so:

salva2d = { version = "whatever", default-features = false, features = ["use-wasm-bindgen"] }

If y'all are ok with this strategy, I can copy it over to salva3d as well.

@ekalosak
Copy link

ekalosak commented Jul 3, 2024

Adding to the default features seems unnecessary at first glance for a change to a specific feature set enabling wasm - for my curiosity, why do you propose adding to the default feature set in this case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants