Skip to content

Commit 82dba51

Browse files
committed
add wasm32-unknown-unknown
1 parent 4ca252c commit 82dba51

File tree

4 files changed

+61
-0
lines changed

4 files changed

+61
-0
lines changed

src/wasm32-unknown-unknown/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
# Cargo Watch Dev Container
3+
4+
A feature to install cargo watch
5+
6+
## Example Usage
7+
8+
```json
9+
"features": {
10+
"ghcr.io/devcontainers/feature-starter/color:1": {
11+
"version": "latest"
12+
}
13+
}
14+
```
15+
16+
## Options
17+
18+
| Options Id | Description | Type | Default Value |
19+
|-----|-----|-----|-----|
20+
| favorite | Choose your favorite color. | string | red |
21+
22+
23+
24+
---
25+
26+
_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/devcontainers/feature-starter/blob/main/src/color/devcontainer-feature.json). Add additional notes to a `NOTES.md`._
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "Rust wasm32_unknown_unknown",
3+
"id": "wasm32-unknown-unknown",
4+
"version": "0.0.1",
5+
"description": "A feature to install wasm32_unknown_unknown",
6+
"options": {
7+
},
8+
"installsAfter": [
9+
"ghcr.io/devcontainers/features/rust"
10+
]
11+
}

src/wasm32-unknown-unknown/install.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
rustup target add wasm32-unknown-unknown

test/wasm32-unknown-unknown/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 "version" rustc --print target-list | grep wasm32-unknown-unknown
10+
11+
# Report result
12+
reportResults

0 commit comments

Comments
 (0)