salva icon indicating copy to clipboard operation
salva copied to clipboard

Add option to compile salva2d with wasm-bindgen

Open willcrichton opened this issue 5 years ago • 1 comments

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.

willcrichton avatar Jun 08 '20 03:06 willcrichton

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?

ekalosak avatar Jul 03 '24 14:07 ekalosak