rustwasm / book

The Rust and WebAssembly Book
https://rustwasm.github.io/docs/book/
MIT License
1.75k stars 211 forks source link

Use `--target web` to reduce complexity of "Hello World" (cut down on tools needed to start) #181

Open kud1ing opened 5 years ago

kud1ing commented 5 years ago

Suggested instructions that don't need a generator or a bundler:

kud1ing commented 5 years ago

Note:

fitzgen commented 5 years ago

This is pretty close to what we already have here: https://rustwasm.github.io/docs/book/game-of-life/hello-world.html

The main difference is that it doesn't use --target web, but we would like it to eventually. The main thing blocking switching the tutorial to using --target web is the addition of watch and serve subcommands to wasm-pack, so that we don't regress dev server and file watching fromt he developer experience.

Since we don't have an issue open in the book repo to track this, I'll make this issue be that.

fitzgen commented 5 years ago

Upstream blockers:

https://github.com/rustwasm/rfcs/pull/10

https://github.com/rustwasm/wasm-pack/issues/457

kud1ing commented 5 years ago

I appreciate this, OTOH:

I am not a newcomer to Rust, but i've struggled for about 1 hour to figure out how to get the current "hello world" working without installing tools i don't understand the need for.

It' s subjective. I prefer to learn bottom up, from the simple towards the complex.

kud1ing commented 5 years ago

I've just noticed that there are some more minimal examples: