Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/second-state/ssvm-deno-starter
A template project to run Rust functions in Deno through the Second State WebAssembly engine.
https://github.com/second-state/ssvm-deno-starter
codespaces deno denoland getting-started github-actions javascript rust rust-lang second-state ssvm ssvmup typescript vscode vscode-codespaces webassembly webassembly-tutorial
Last synced: 3 months ago
JSON representation
A template project to run Rust functions in Deno through the Second State WebAssembly engine.
- Host: GitHub
- URL: https://github.com/second-state/ssvm-deno-starter
- Owner: second-state
- Created: 2020-06-14T23:39:09.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-08T08:00:50.000Z (over 4 years ago)
- Last Synced: 2024-08-01T02:26:58.720Z (6 months ago)
- Topics: codespaces, deno, denoland, getting-started, github-actions, javascript, rust, rust-lang, second-state, ssvm, ssvmup, typescript, vscode, vscode-codespaces, webassembly, webassembly-tutorial
- Language: Dockerfile
- Homepage: https://www.secondstate.io/articles/ssvmup/
- Size: 1.71 MB
- Stars: 53
- Watchers: 7
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![Build and test](https://github.com/second-state/ssvm-deno-starter/workflows/Build%20and%20test/badge.svg)
Check out this tutorial article: *[Deno Apps with WebAssembly, Rust, and WASI](https://www.secondstate.io/articles/deno-webassembly-rust-wasi/)*
## Prerequisites
[Install Deno](https://deno.land/manual/getting_started/installation)
[Install Rust](https://www.rust-lang.org/tools/install)
Also, if you have not done so, please bring your Linux system up to date with dev tools.
```
sudo apt install build-essential curl wget git vim libboost-all-dev
```## Setup
The command below installs the [ssvmup tooling](https://www.secondstate.io/articles/ssvmup/).
```
$ curl https://raw.githubusercontent.com/second-state/ssvmup/master/installer/init.sh -sSf | sh
```## Build
```
$ ssvmup build --target deno
```## Test
```
$ deno run --allow-read --allow-env --unstable deno/test.ts
```NOTE: If you encounter an error here, most likely your Deno install and cached library files are out of sync. Use the [deno cache --reload command to fix this issue](https://www.secondstate.io/articles/reload-deno-cache/).
## Run
```
$ deno run --allow-read --allow-net --allow-env --unstable deno/server.ts
```## User test
```
$ curl http://localhost:8000/
hello World
```## Next steps
Check out the [SSVM Deno repository for more WebAssembly examples on Deno](https://github.com/second-state/wasm-learning/tree/master/deno).
Tutorial article: *[Deno Apps with WebAssembly, Rust, and WASI](https://www.secondstate.io/articles/deno-webassembly-rust-wasi/)*