Rust and WebAssembly

This small book describes how to use Rust and WebAssembly together. 这本小册讲的是如何去将Rust和WebAssembly一起使用。

Who is this book for?

这本书是给哪些人看的?

This book is for anyone interested in compiling Rust to WebAssembly for fast, reliable code on the Web. You should know some Rust, and be familiar with JavaScript, HTML, and CSS. You don’t need to be an expert in any of them. 这本书适合所有有兴趣将Rust编译成WebAssembly以获得运行在web上的快速可靠的代码。你需要知道一些rust,还要熟悉js、html、css。但你不需要特别精通它们。

Don’t know Rust yet? Start withThe Rust Programming Languagefirst. 还不知道rust?点击链接学习先

Don’t know JavaScript, HTML, or CSS? Learn about them on MDN. 不会js、html、css? 点击链接学习先

How to read this book

如何阅读这本书

You should read the motivation for using Rust and WebAssembly together, as well as familiarize yourself with the background and concepts first. 你应该阅读一起使用rust和WebAssembly的动机,以及熟悉一些背景和概念先。

The tutorial is written to be read from start to finish. You should follow along: writing, compiling, and running the tutorial’s code yourself. If you haven’t used Rust and WebAssembly together before, do the tutorial! 这个教程是为了从头到尾阅读而编写的,你应该跟着自己编写,编译并运行教程的代码,如果你没有一起使用过他们,跟着教程来!

The reference sections may be perused in any order. 可以以任何顺序阅读参考部分。

💡 Tip: You can search through this book by clicking on the 🔍 icon at the top of the page, or by pressing the s key. 提示:你可以通过点击内容上方的搜索图标或者按s键来搜索这本书

Contributing to this book

如何贡献

This book is open source! Find a typo? Did we overlook something? Send us a pull request! 这本书是开源的!发现错误?我们忽略了什么?点击链接github贡献!