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

Inconsistency between main Wasmtime web page and documentation #8101

Closed
rikhuijzer opened this issue Mar 12, 2024 · 4 comments · Fixed by #8115
Closed

Inconsistency between main Wasmtime web page and documentation #8101

rikhuijzer opened this issue Mar 12, 2024 · 4 comments · Fixed by #8115

Comments

@rikhuijzer
Copy link
Contributor

I've been reading a bit about the Bytecode Alliance and Wasmtime and I am currently somewhat confused.

My confusion comes from the fact that I started learning about Wasmtime from https://wasmtime.dev. This example is positioned clearly on the front page:

fn main() {
    println!("Hello, world!");
}
$ rustup target add wasm32-wasi
$ rustc hello.rs --target wasm32-wasi
$ wasmtime hello.wasm
Hello, world!

So from that my main take away was that Wasmtime can be used to run Rust code in a secure sandbox.

However, when I actually go into the codebase and the docs at https://docs.wasmtime.dev/, then the example from the front page isn't even mentioned, but instead it is mostly about how to use the Wasmtime API (not CLI) to run programs which now suddenly require wat files too.

So my question is: how should I mentally connect these two concepts? Why did the first example not require a wat file while the Hello, world! example does?

If someone could provide me some quick and high level overview, then I'll do my best to update the documentation based on that (with the caveat that I'm AFK the next week and the week after).

@abrown
Copy link
Contributor

abrown commented Mar 12, 2024

*.wasm and *.wat files are equivalent: *.wasm is the binary encoding while *.wat is the (somewhat) human-readable textual representation. Does that help?

@alexcrichton
Copy link
Member

If you're up for it, assistance in updating documentation is always appreciated! We've got a number of ways that Wasmtime can be used and it's hard to keep them all updated and in-sync and generalized for any target audience.

@rikhuijzer
Copy link
Contributor Author

If you're up for it, assistance in updating documentation is always appreciated! We've got a number of ways that Wasmtime can be used and it's hard to keep them all updated and in-sync and generalized for any target audience.

@alexcrichton good to know! When updating the docs, is it important to try to not conflict with #7987?

@alexcrichton
Copy link
Member

Oh no don't worry about that, I need to spend time on that at some point but I haven't gotten to it. Feel free to change whatever you'd like and I'm happy to work around any merge conflicts.

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

Successfully merging a pull request may close this issue.

3 participants