diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..b75d1b9 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,20 @@ +ARG VARIANT="22" +FROM mcr.microsoft.com/devcontainers/javascript-node:1-${VARIANT} + +# Install system dependencies +RUN apt-get update \ + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends curl gnupg2 tar xz-utils build-essential \ + && rm -rf /var/lib/apt/lists/* + +# Switch to node user to install wasmtime +USER node + +# Install Wasmtime +RUN curl https://wasmtime.dev/install.sh -sSf | bash + +# Install just +RUN npm install -g rust-just + +# Set up workspace +WORKDIR /workspace diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..c2ce5b3 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,13 @@ +{ + "name": "wasi-http-js", + "build": { + "dockerfile": "Dockerfile", + "context": ".." + }, + "settings": { + }, + "extensions": [ + ], + "forwardPorts": [8080], + "remoteUser": "node" +} diff --git a/README.md b/README.md index ab97c2f..bcb239b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Sample: `wasi:http` in JavaScript -[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/andreiltd/sample-wasi-http-js) +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/bytecodealliance/sample-wasi-http-js) An example project showing how to build a spec-compliant [`wasi:http/proxy`][wasi-http] server for WASI 0.2 written in JavaScript.