From 104e73c382204b0e2589d2ecfabb38d6502f1720 Mon Sep 17 00:00:00 2001 From: Vincent Herlemont Date: Thu, 28 Dec 2023 14:54:59 +0100 Subject: [PATCH] feat: support wasi --- .github/workflows/build_test_wasi.yml | 39 +++++++++++++++++++++++++++ justfile | 3 +++ 2 files changed, 42 insertions(+) create mode 100644 .github/workflows/build_test_wasi.yml diff --git a/.github/workflows/build_test_wasi.yml b/.github/workflows/build_test_wasi.yml new file mode 100644 index 00000000..4f4eb6d7 --- /dev/null +++ b/.github/workflows/build_test_wasi.yml @@ -0,0 +1,39 @@ +name: WASI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main, next ] + +env: + RUST_BACKTRACE: full + +jobs: + build_test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest] + toolchain: [stable] + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + toolchain: ${{ matrix.toolchain }} + override: true + - name: Add target + run: rustup target add wasm32-wasi + - uses: extractions/setup-just@v1 + - uses: hustcer/setup-nu@v3.8 + with: + version: '0.85' + env: + GITHUB_TOKEN: ${{ secrets.PAT_GLOBAL }} + - name: Just version + run: just --version + - name: Build + run: just build_wasi \ No newline at end of file diff --git a/justfile b/justfile index deee47dd..a6de9c9b 100644 --- a/justfile +++ b/justfile @@ -12,6 +12,9 @@ build_default: build_with_optional: cargo build -F chrono -F uuid -F tokio +build_wasi: + cargo build --target=wasm32-wasi + build_all: build_no_default build_default build_with_optional test_no_default: