salva
salva copied to clipboard
Add option to compile salva2d with wasm-bindgen
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.
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?