Skip to content

Commit

Permalink
Merge pull request #10 from Mewz-project/dev/quickstart_devcontainer
Browse files Browse the repository at this point in the history
add devcontainer
  • Loading branch information
ainozaki authored Dec 29, 2023
2 parents f09576c + bff969c commit 5947507
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM mcr.microsoft.com/devcontainers/rust:1-1-bookworm

RUN apt-get update && apt-get install -y cmake

ARG LLVM_URL=https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.0/clang+llvm-15.0.0-x86_64-linux-gnu-rhel-8.4.tar.xz

# install llvm
RUN mkdir -p /usr/local/llvm \
&& wget ${LLVM_URL} -O /tmp/llvm.tar.xz \
&& tar -xvf /tmp/llvm.tar.xz -C /usr/local/llvm \
&& rm /tmp/llvm.tar.xz

ENV PATH=/usr/local/llvm/bin:$PATH
ENV LLVM_SYS_150_PREFIX=/usr/local/llvm/clang+llvm-15.0.0-x86_64-linux-gnu-rhel-8.4
7 changes: 7 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Wasker Dev Container",
"build": {
"context": "..",
"dockerfile": "./Dockerfile"
}
}
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# Wasker

Wasker is a WebAssembly compiler.
Wasker compiles Wasm binary into ELF format binary.
Wasker compiles Wasm binary into ELF format binary. 
Currently, Wasker supports WASI preview 1.

![Wasker_architecture](./doc/assets/wasker_architecture.png "Wasker_architecture")

Expand Down Expand Up @@ -52,8 +53,21 @@ docker run -it --rm -v $PWD/mount:/work/mount -t ghcr.io/mewz-project/wasker:lat
[2023-12-28T09:20:28Z INFO wasker::compiler] Compile success
```

## Option2 : Use Devcontainer
You can try Wasker on browser via Devcontainer.

## Option2 : Build from source
Start Devcontainer
- Click `Code` -> `Codespaces` -> `New codespace` on this repository page.
- Wait for a while, then you can see VSCode on browser.
- Open terminal on VSCode

Run Wasker
```
cargo run helloworld.wat
```


## Option3 : Build from source
Clone repository
```
git clone [email protected]:Mewz-project/Wasker.git
Expand Down

0 comments on commit 5947507

Please sign in to comment.