Skip to content

Commit c4468e6

Browse files
committed
add wasm-server-runner
1 parent 544dac0 commit c4468e6

File tree

6 files changed

+67
-0
lines changed

6 files changed

+67
-0
lines changed

.github/workflows/test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
- dioxus
4141
- tinygo
4242
- cargo-web
43+
- wasm-server-runner
4344
# NEXT
4445
baseImage:
4546
- debian:latest
@@ -83,6 +84,7 @@ jobs:
8384
- dioxus
8485
- tinygo
8586
- cargo-web
87+
- wasm-server-runner
8688
# NEXT
8789
steps:
8890
- uses: actions/checkout@v3

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ Helix | ghcr.io/lee-orr/rusty-dev-containers/helix:0 | Installs the [Helix](http
3838
| Dioxus | ghcr.io/lee-orr/rusty-dev-containers/dioxus:0 | Installs the [Dioxus CLI](https://github.com/DioxusLabs/cli) to enable easy development with the Dioxus framework |
3939
| | **Other Tools** | |
4040
| Tiny Go (no sudo) | ghcr.io/lee-orr/rusty-dev-containers/tinygo:0 | Installs Tiny Go without requiring a Sudo. Useful for working with WasmCloud |
41+
| Wasm Server Runner | ghcr.io/lee-orr/rusty-dev-containers/wasm-server-runner:0 | Installs [Wasm Server Runner](https://github.com/jakobhellermann/wasm-server-runner) - a cargo plugin allowing the use of `cargo run` with wasm32-unknown-unknown projects, and serving those projects |

src/wasm-server-runner/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
# Cargo Expand (cargo-expand)
3+
4+
A feature to install cargo expand
5+
6+
## Example Usage
7+
8+
```json
9+
"features": {
10+
"ghcr.io/lee-orr/rusty-dev-containers/cargo-expand:0": {}
11+
}
12+
```
13+
14+
## Options
15+
16+
| Options Id | Description | Type | Default Value |
17+
|-----|-----|-----|-----|
18+
19+
20+
21+
22+
---
23+
24+
_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/lee-orr/rusty-dev-containers/blob/main/src/cargo-expand/devcontainer-feature.json). Add additional notes to a `NOTES.md`._
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "Wasm Server Runner",
3+
"id": "wasm-server-runner",
4+
"version": "0.0.3",
5+
"description": "A feature to install wasm server runner",
6+
"options": {
7+
},
8+
"installsAfter": [
9+
"ghcr.io/devcontainers/features/rust",
10+
"cargo_binstall"
11+
]
12+
}

src/wasm-server-runner/install.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
set -e
3+
4+
if ! (which rustup > /dev/null && which cargo > /dev/null); then
5+
which curl > /dev/null || (apt update && apt install curl -y -qq)
6+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
7+
source $HOME/.cargo/env
8+
fi
9+
10+
dpkg -l | grep build-essential || (apt update && apt install build-essential -y -qq)
11+
12+
if ! cargo install --list | grep "cargo-binstall" > /dev/null; then
13+
cargo install cargo-binstall --locked
14+
fi
15+
16+
cargo binstall wasm-server-runner --locked -y

test/wasm-server-runner/test.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Optional: Import test library
6+
source dev-container-features-test-lib
7+
8+
# Definition specific tests
9+
check "installed" cargo install --list | grep "wasm-server-runner"
10+
11+
# Report result
12+
reportResults

0 commit comments

Comments
 (0)