You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on [Compiling Rust to Wasm manually with the LLVM wasm-backend (without Emscripten)](https://gist.github.com/LukasKalbertodt/821ab8b85a25f4c54544cc43bed2c39f)
5
+
6
+
## Usage
7
+
8
+
First, prepare your rust source file, e.g. `add.rs`.
9
+
10
+
```rust
11
+
#[no_mangle]
12
+
pubfnadd_twenty_seven(n:i32) ->i32 {
13
+
n+27
14
+
}
15
+
```
16
+
17
+
Then run this docker image, compiling rust into wasm.
18
+
19
+
```bash
20
+
docker run -it --rm -v "$(pwd):/work" opengg/rust-wasm add.rs
21
+
```
22
+
23
+
## Run an interactive shell
24
+
25
+
Alternatively, you can run an interactive shell, exploring
26
+
this docker image freely.
27
+
28
+
```bash
29
+
docker run -it --rm -v "$(pwd):/work" --entrypoint bash opengg/rust-wasm
0 commit comments