-
Notifications
You must be signed in to change notification settings - Fork 29
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
Please support cargo install
from source even if precompiled binary exists
#23
Comments
Thanks for the report! It was always intended that Otherwise this should be working now I believe. If there are issues with the wrong platform that can be handled as they arise (I don't think that is configured to happen right now though). I'll push up some documentation about installing from source to make sure it's in the reference though. I've opened #25 to track the a feature which will disable the update check if this is packaged elsewhere.
This is an explicit decision currently because of the instability we've experience from |
@alexcrichton Thank you very much for the fix! The documentation you provided helps, and I can try to propagate a similar note to other guides/tutorials that suggest installing
That would indeed help, thank you. As a thought, would you consider making the update check a disabled-by-default feature, and then setting that feature when building the prebuilt binaries? If someone takes the time and trouble to build
I absolutely appreciate that, and I wouldn't want you to compromise the user experience (or generate more support issues) for users who install the prepackaged binaries. The case I'm thinking of would be users who have already installed a stable packaged binary version of wasm-opt from their distribution, and want to make sure cargo-wasi uses that version. (Distribution packagers of cargo-wasi would want the same thing, and would declare a dependency from their cargo-wasi package to the package providing wasm-opt.) I'd very much like to have build-time configuration for this. Would it make sense to tie this to the bundling of the requisite binary alongside the prebuilt cargo-wasi binary? That would mean that the prebuilt binary would have its prebuilt wasm-opt, and users who build from source would need wasm-opt on their PATH (unless they also use the same mechanism to bundle a wasm-opt themselves). Does that seem reasonable to you? Thanks again for cargo-wasi! I really appreciate how much work you're putting in to provide not just capabilities but usability to help people work with WebAssembly and WASI! |
I was very surprised when running
cargo install cargo-wasi
that it seems to have installed a precompiled binary rather than installing from source.I realize that
cargo install
does not have support for installing precompiled binaries, and I realize that you're trying to optimize for people runningcargo install cargo-wasi
so they don't have to wait for cargo-wasi's dependencies to compile. I'd also like to take a moment to say that this is a very impressive hack. :)However, manually implementing support for precompiled binaries in this way has several surprising side effects:
cargo-wasi-exe-x86_64-unknown-linux-musl
and realizing what that implied.cargo
would be user-controllable, such as through an explicit option toinstall
or a separate command.)cargo-wasi
, and would require patching to disable in that case.cargo-wasi-src
from crates.io doesn't build; it errors out with:error[E0433]: failed to resolve: use of undeclared type or module cargo_wasi
.Could you please provide a means of using
cargo install
to install cargo-wasi from source and not use precompiled binaries?I would personally prefer if
cargo install cargo-wasi-bin
installed a precompiled binary that uses precompiled binaries, andcargo install cargo-wasi
installed from source and expected system binaries. But I could also live with flipping those around so thatcargo install cargo-wasi-src
installed from source and expected system binaries, or if passing a feature flag disabled the use of precompiled binaries, as long as that was clearly documented; it wouldn't be my preference, but I can imagine that others might prefer that.The text was updated successfully, but these errors were encountered: