-
Notifications
You must be signed in to change notification settings - Fork 409
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
wasm32-unknown-unkown target without rustup? #545
Comments
Indeed, rustup is the official all-in-one Rust tool for:
Is there a particular reason you chose to manually compile Rust rather than use rustup? What OS are you using? It looks like some flavor of Linux.
wasm-pack installs itself into the rustup directory, to avoid polluting your system with things spread all over the place. It also uses rustup to check whether you have the Since rustup is the standard way to use Rust, and since it is supported across all platforms, it's easier for wasm-pack to use it instead of creating custom ad-hoc solutions. But maybe there's a way we can support using wasm-pack without rustup?
Is there anything we can do to improve that? I took a look at the tutorial and it makes it clear that you need rustup, and it also says to install wasm-pack first, and then create the project. Are you following a different tutorial somewhere else? |
I think the simplest thing would be to give an example usage when defining the tool for the first time. The reason I didn't install it right away is that is was clear to me that wasm-pack was a collection of multiple tools. There was a possibility in my mind that the configuration from wasm-pack-template would allow Giving an example usage of wasm-pack would help indicate the tutorial will be using the tool directly for building later. |
I am running Ubuntu 18.04.2 in a Virtual Box environment. |
I think it is worth supporting non-
FWIW, it says right above there that you need
|
Currently it uses |
@fitzgen That's precisely the issue I had. The words
meant absolutely nothing to me. I had never used the rust toolchain before, so there was still no indication (for me) that the That said, in the text you quoted I was referring to wasm-pack. Again, I had never seen the tool before. So without an example output I felt lost. To be completely fair, the cli gif in the README is pretty good. If that same gif appeared in rustwasm & wasm-pack books, it could be helpful for folk who understand by example. |
We could try compiling a hello world (add a and b) crate to wasm and see if it works or not. This is essentially what configure does when checking whether there is a working C/C++ compiler. |
there's a somewhat stale PR that was attempting to do this- i am going to work on a release today for tomorrow and i'll see if we can get it in |
I am trying to follow the Rust and WebAssembly tutorial, but I am stuck at "Build the Project".
What I have done
I am completely new to both rust and WebAssembly, so here is literally everything I have done, in order.
git clone git@github.com:rust-lang/rust.git
.git clone git@github.com:rust-lang/cargo.git
.cargo
binary from step 2).cp target/release/cargo ~/.local/bin/cargo
.install.root
as ~/.local.cargo install cargo-generate
.cargo generate --git https://github.com/rustwasm/wasm-pack-template
.cargo install wasm-pack
- and yes, I really did this after generating my project. The documentation is lacking here.ERRORS
It is at this point I am now stuck.
wasm-pack error
wasm-pack build
is complaining that I don't have rustup installed. Which is true, but I don't really understand why that's a problem.cargo error
cargo build --target=wasm32-unknown-unknown
is throwing the following error.rustup installer error
curl https://sh.rustup.rs -sSf | sh
is complaining that I have an existing install of rust.This error also doesn't make any sense to me since it appears that rustup does more than just install rustc.
Report Elsewhere
I would really rather not completely start over just to install the rustup tool. Please help me by telling me where else I should be reporting some of these errors.
The text was updated successfully, but these errors were encountered: