This is a repo that lets you try out Rust and WebAssembly in VisualStudio Code. This requires the VS Code Remote - Containers extension to work.
Open the root directory of this repository in VS Code. It should ask you if you want to open the repo in a remote container. Choose yes.
Once you have this sample opened in a container, you'll be able to work with it like you would locally.
Some things to try:
- Edit:
- Open
src/lib.rs
- Try adding some code and check out the language features.
- Open
- Terminal: Press ctrl+shift+` and type
uname
and other Linux commands from the terminal window. - Build and Run:
- Open a terminal and type
wasm-pack build -t web
- Once the project is compiled, run
simple-http-server
and open http://localhost:8000/index.html in your browser.
- Open a terminal and type
The project is based off of the Try Out Development Containers: Rust created by Microsoft. The container configuration was adjusted to include libraries and tools for the WebAssembly development with Rust.
Copyright © Microsoft Corporation All rights reserved.
Licensed under the MIT License. See LICENSE in the project root for license information.