Skip to content

Commit 898bb26

Browse files
authored
devcontainer for ease of development (#64)
* initial dev container and setup script * found fix for uniffi installation * additional dependency * need to use nightly build of rust * wasm-bindgen versioning issue
1 parent eed06c6 commit 898bb26

3 files changed

Lines changed: 35 additions & 3 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "MFKDF2-${localEnv:USERNAME}",
3+
"image": "mcr.microsoft.com/devcontainers/rust:2-1-trixie",
4+
"features": {
5+
"ghcr.io/devcontainers/features/python:1": {},
6+
"ghcr.io/devcontainers-extra/features/corepack:1": {},
7+
"ghcr.io/devcontainers-extra/features/npm-package:1": {}
8+
},
9+
"customizations": {
10+
"vscode": {
11+
"extensions": [
12+
"streetsidesoftware.code-spell-checker",
13+
"Gruntfuggly.todo-tree"
14+
]
15+
}
16+
},
17+
"postCreateCommand": ".devcontainer/setup.sh"
18+
}

.devcontainer/setup.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# switch to nightly rust
2+
rustup default nightly
3+
4+
# install just
5+
cargo install just
6+
cargo install uniffi --features="cli" # this may have changed since the documentation attemps `cargo install uniffi-bindgen` and that no longer works
7+
8+
# dependencies
9+
just install-wasm-opt # not done by setup
10+
just setup
11+
# just install-tools # done by above
12+
# just install-rust # done by above
13+
# just install-uniffi-deps # done by above
14+
just ensure-wasm-bindgen-cli

justfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,10 @@ _ci-summary-failure:
191191
# ensure wasm-bindgen-cli is installed
192192
ensure-wasm-bindgen-cli:
193193
@if ! command -v wasm-bindgen > /dev/null || ! wasm-bindgen --version | grep -q "0.2.104"; then \
194-
printf "{{info}}Installing wasm-bindgen-cli 0.2.104...{{reset}}\n" && \
195-
cargo install wasm-bindgen-cli --version 0.2.104; \
194+
printf "{{info}}Installing wasm-bindgen-cli 0.2.118...{{reset}}\n" && \
195+
cargo install wasm-bindgen-cli --version 0.2.118; \
196196
else \
197-
printf "{{success}}✓ wasm-bindgen-cli 0.2.104 already installed{{reset}}\n"; \
197+
printf "{{success}}✓ wasm-bindgen-cli 0.2.118 already installed{{reset}}\n"; \
198198
fi
199199

200200
# installs wasm-opt via cargo if missing

0 commit comments

Comments
 (0)