-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from Mewz-project/dev/quickstart_devcontainer
add devcontainer
- Loading branch information
Showing
3 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "Wasker Dev Container", | ||
"build": { | ||
"context": "..", | ||
"dockerfile": "./Dockerfile" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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") | ||
|
||
|
@@ -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 | ||
|