second-state/rustwasmc

Build from source if no pre-built binaries are available

Closed this issue · 2 comments

It is currently required that a pre-built binary for necessary tools such as 'wasm-bindgen-cli' be available; if there are none, rustwasmc will error out. Would it not be better to run 'cargo install ...' to build the binaries from source if this fails?

This change would allow support for architecture such as Arm.

There are wasm-bindgen-cli prebuilt binaries for Arm. If it failed to download the prebuilt or there is not any compatible to your platform, you can build it from source the put the binary under $PATH, then it will be used instead of downloading the prebuilt.

There are wasm-bindgen-cli prebuilt binaries for Arm. If it failed to download the prebuilt or there is not any compatible to your platform, you can build it from source the put the binary under $PATH, then it will be used instead of downloading the prebuilt.

I understand that it checks $PATH first, however, due to the fact that it is required that the wasm-bindgen-cli be the exact version of bindgen specified in cargo.toml for it to work correctly, this could be a quite arduous task if working on multiple projects. Surely it would be better to automatically compile the correct version?