1
0
forked from ROMEO/nexosim

Expose the Protobuf simulation service to WASM/JS

This commit is contained in:
Serge Barral
2024-05-27 23:21:26 +02:00
parent 77e6e569ff
commit 59d2af51ba
12 changed files with 252 additions and 242 deletions

View File

@ -28,7 +28,22 @@ jobs:
toolchain: ${{ matrix.rust }}
- name: Run cargo check
run: cargo check --features="rpc grpc-server"
run: cargo check --features="rpc grpc-service"
build-wasm:
name: Build wasm32
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Run cargo build (wasm)
run: cargo build --target wasm32-unknown-unknown --features="rpc"
test:
name: Test suite
@ -41,7 +56,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
- name: Run cargo test
run: cargo test --features="rpc grpc-server"
run: cargo test --features="rpc grpc-service"
loom-dry-run:
name: Loom dry run
@ -54,7 +69,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
- name: Dry-run cargo test (Loom)
run: cargo test --no-run --tests --features="rpc grpc-server"
run: cargo test --no-run --tests --features="rpc grpc-service"
env:
RUSTFLAGS: --cfg asynchronix_loom
@ -71,12 +86,12 @@ jobs:
components: miri
- name: Run cargo miri tests (single-threaded executor)
run: cargo miri test --tests --lib --features="rpc grpc-server"
run: cargo miri test --tests --lib --features="rpc grpc-service"
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-disable-isolation -Zmiri-num-cpus=1
- name: Run cargo miri tests (multi-threaded executor)
run: cargo miri test --tests --lib --features="rpc grpc-server"
run: cargo miri test --tests --lib --features="rpc grpc-service"
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-disable-isolation -Zmiri-num-cpus=4
@ -134,7 +149,7 @@ jobs:
run: cargo fmt --all -- --check
- name: Run cargo clippy
run: cargo clippy --features="rpc grpc-server"
run: cargo clippy --features="rpc grpc-service"
docs:
name: Docs
@ -147,4 +162,4 @@ jobs:
uses: dtolnay/rust-toolchain@stable
- name: Run cargo doc
run: cargo doc --no-deps --features="rpc grpc-server" --document-private-items
run: cargo doc --no-deps --features="rpc grpc-service" --document-private-items