Tag:
Branch:
Tree:
f5eaad2d77
master
${ noResults }
1 Commits (f5eaad2d77bf69bc97738c8ae638b527d17e1e3a)
Author | SHA1 | Message | Date |
---|---|---|---|
![]() |
69e5af8fe2 |
Add an experimental installer for wasm-pack
This commit kicks off the addition of installers for wasm-pack, with the main goals of being: * Users should have a one-click (ideally) solution to download and install wasm-pack. * We should ideally not have to worry about picking up "heavy" dependencies in wasm-pack like C++ or C code (if necessary). The general idea here is very similar to rustup (and in fact a good deal of code is copied from them!). The installation worklow for wasm-pack in theory after this commit looks like: 1. First, a users visits the installer landing page. A preview is available at https://alexcrichton.github.io/wasm-pack/installer/. Clearly this page needs a better stylesheet! 2. The user performs the instructions presented on the page. The website automatically detects what platform you're running on, basically giving you a curl/sh script or a Windows installer. There's various options for seeing other installers as well, and the fallback of `cargo install` is presented if we don't recognize the platform (or if we don't think we have precompiled binaries). 3a. On Unix, users execute a curl/sh script like: ``` curl https://alexcrichton.github.io/wasm-pack/installer/init.sh -sSf | sh ``` This command will download the shell script included in this PR, which will in turn do some further platform detection (like OSX vs Linux) and then download the most recent version of `wasm-pack` from GitHub releases. This is then extracted, the `wasm-pack` binary is renamed to `wasm-pack-init`, and then that binary is run. The binary will refuse by default to overwrite a previous installation, but that can be overridden with the `-f` flag. 3b. On Windows users download a binary. This binary, when run, will pop up a console window. This window will have the same output as the shell script installer, and will wait at the end of its execution to ensure the user has time to read everything. And... that's it! The deployment process for all this looks like so: * All CI builds will update the website and shell script (published to gh-pages). A small script at `docs/installer/build-installer.rs` fills in the current version number inferred from `Cargo.toml`. * Tagged CI builds will publish releases, as usual. * "Pushing a release" is done by bumping the version number in `Cargo.toml`. When bumped all online installers will now point to the new release. There will be a window of time, though, when the version number is bumped and the release hasn't finished building on CI. In this case users will get errors (unfortunately). This is all still a work-in-progress and feedback is definitely appreicated and welcome on all this! |
7 years ago |