Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the wasmer.sh website to the main repo and a CI/CD build test #3759

Merged
merged 8 commits into from
Apr 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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