Skip to content
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

Documenting rustwasm without npm #150

Open
ApoorvaJ opened this issue Feb 21, 2019 · 2 comments
Open

Documenting rustwasm without npm #150

ApoorvaJ opened this issue Feb 21, 2019 · 2 comments

Comments

@ApoorvaJ
Copy link

Describe what about it does not make sense

The docs are currently unclear about how to use rustwasm without npm.

I read through the docs multiple times and came out with the vague impression that usage without NodeJS is currently impossible. Someone correcting me on Twitter, and a circuitous search through Reddit finally led me to the solution.

There are the following problems here:

  1. There are two books A and B. There is a lot of overlap between the two books and they are hosted on the same domain. This is confusing to the point where I didn't realize for two days that there are two books on the website. The latter book isn't even linked from the home page.
  2. The first book never mentions (as far as I know) that building without npm is possible. This should be clearly stated, especially when so many people are working on servers in Rust.
  3. The second book also doesn't mention this clearly, but it does contain the --no-modules section that achieves what we want.

How could we improve

  1. Combine the two books into one, or at least make them mutually exclusive in terms of information contained.
  2. If two distinct books are kept, then link them both prominently from the home page.
  3. Make it obvious wherever applicable how to build without npm. Also discuss the --no-typescript option prominently.
@Pauan
Copy link

Pauan commented Feb 21, 2019

I generally agree with what you said, however:

especially when so many people are working on servers in Rust.

Why do you say that?

npm is not only about the server: npm is a general purpose JavaScript package manager, and many npm packages are designed for the browser (and they won't even work on the server).

npm is used just as much by browser developers as it is by server developers. It is the de-facto package manager for the entire JavaScript community.

So even if you plan to use WebAssembly only in the browser, you'll still likely need npm (and Webpack).

@alexcrichton
Copy link
Contributor

Thanks for the report @ApoorvaJ! I was inspired by this to give a fresh review to some wasm-bindgen docs (rustwasm/wasm-bindgen#1285), and we've also had a proposal to deploy all the books into one location rather than across a few to ensure they're appropriately cross-linked and discoverable.

In any case this is definitely something where we want to make sure the intro docs all leave the right impression!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants