Skip to content

Commit

Permalink
Merge pull request #3759 from wasmerio/wasmer-sh
Browse files Browse the repository at this point in the history
Added the wasmer.sh website to the main repo and a CI/CD build test
  • Loading branch information
john-sharratt authored Apr 9, 2023
2 parents 126d0d5 + c5ce85f commit f5ed2be
Show file tree
Hide file tree
Showing 33 changed files with 30,436 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .github/workflows/web.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Separate workflow for the wasmer-web crate.
#

# Automatically cancel previous workflow runs when a new commit is pushed.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

name: Wasmer Web
on:
push:
branches:
- main
pull_request:
jobs:
web:
name: Build and Test (wasmer-web)
strategy:
matrix:
os: [ubuntu-latest]
rust: [nightly]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Rust
uses: actions/checkout@v3
with:
toolchain: ${{ matrix.rust }}

- name: Show Rust version
run: |
rustc --version
- name: Check formatting
shell: bash
run: |
cd lib/wasi-web
cargo fmt --check
- name: Check
continue-on-error: true
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
run: |
cd lib/wasi-web
cargo check
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ members = [
"tests/integration/ios",
"fuzz",
]
exclude = [
"lib/wasi-web",
]
resolver = "2"

[build-dependencies]
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,13 @@ check-capi:
build-wasmer:
$(CARGO_BINARY) build $(CARGO_TARGET_FLAG) --release --manifest-path lib/cli/Cargo.toml $(compiler_features) --features="webc_runner" --bin wasmer

install-wasi-web:
cd lib/wasi-web && npm install || true
cd lib/wasi-web && npm run build

build-wasi-web:
cd lib/wasi-web && npm run build

build-wasmer-debug:
$(CARGO_BINARY) build $(CARGO_TARGET_FLAG) --manifest-path lib/cli/Cargo.toml $(compiler_features) --features "webc_runner,debug" --bin wasmer

Expand Down
8 changes: 8 additions & 0 deletions lib/wasi-web/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[unstable]
build-std = ['std', 'panic_abort']

[build]
target = "wasm32-unknown-unknown"
# This is needed so the module is compiled with atomics support (shared memory)
# We add the `-no-check-features` linker args because otherwise one of the modules fails to link
rustflags = '-Ctarget-feature=+atomics,+bulk-memory -Clink-args=--no-check-features'
7 changes: 7 additions & 0 deletions lib/wasi-web/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
dist
.parcel-cache
.cache
target
pkg
wapm/*.wasm
Loading

0 comments on commit f5ed2be

Please sign in to comment.