Skip to content

Commit

Permalink
feat!: rename to wadge
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Sep 24, 2024
1 parent 46c4aa4 commit 28a3562
Show file tree
Hide file tree
Showing 146 changed files with 6,545 additions and 762 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/west.yml → .github/workflows/wadge.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: west
name: wadge

on:
merge_group:
Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:
#- aarch64-apple-darwin
#- x86_64-apple-darwin

name: west-${{ matrix.target }}
name: wadge-${{ matrix.target }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand All @@ -42,7 +42,7 @@ jobs:
cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- uses: ./.github/actions/build-nix
with:
package: west-${{ matrix.target }}
package: wadge-${{ matrix.target }}

build-ffi-darwin:
strategy:
Expand All @@ -56,20 +56,20 @@ jobs:
target: aarch64-apple-darwin
sdk: 11.0

name: west-${{ matrix.config.target }}
name: wadge-${{ matrix.config.target }}
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: rustup show
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
- run: cargo build -p west-sys --release --target ${{ matrix.config.target }}
- run: cargo build -p wadge-sys --release --target ${{ matrix.config.target }}
env:
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.config.sdk }}
- run: mkdir -p artifact/lib
- run: mv target/${{ matrix.config.target }}/release/libwest_sys.a artifact/lib/libwest_sys.a
- run: mv target/${{ matrix.config.target }}/release/libwadge_sys.a artifact/lib/libwadge_sys.a
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: west-${{ matrix.config.target }}
name: wadge-${{ matrix.config.target }}
path: artifact

build-wasm:
Expand All @@ -81,8 +81,8 @@ jobs:
with:
cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix profile install --inputs-from . '.#rust' 'nixpkgs#wasm-tools'
- run: cargo build -p west-passthrough --target wasm32-unknown-unknown --release
- run: wasm-tools component new target/wasm32-unknown-unknown/release/west_passthrough.wasm -o lib/passthrough.wasm
- run: cargo build -p wadge-passthrough --target wasm32-unknown-unknown --release
- run: wasm-tools component new target/wasm32-unknown-unknown/release/wadge_passthrough.wasm -o lib/passthrough.wasm
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: passthrough
Expand Down Expand Up @@ -139,8 +139,8 @@ jobs:
path: lib
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: west-${{ matrix.config.target }}
- run: mv lib/libwest_sys.a "lib/${{ matrix.config.lib }}/libwest.a"
name: wadge-${{ matrix.config.target }}
- run: mv lib/libwadge_sys.a "lib/${{ matrix.config.lib }}/libwadge.a"
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod
Expand All @@ -151,7 +151,7 @@ jobs:
- run: go test -failfast ./...
env:
GOGC: 1
WEST_LOG: trace
WADGE_LOG: trace
- run: git diff --exit-code

test-dev:
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
- run: go test -failfast -tags=dev ./...
env:
GOGC: 1
WEST_LOG: trace
WADGE_LOG: trace
- run: git diff --exit-code

gofmt:
Expand Down Expand Up @@ -300,9 +300,9 @@ jobs:
cat <<EOF > doc/index.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>Redirecting to west/index.html</title>
<meta http-equiv="refresh" content="0; URL=west/index.html">
<link rel="canonical" href="https://${{ github.repository_owner }}.github.io/west/west/index.html">
<title>Redirecting to wadge/index.html</title>
<meta http-equiv="refresh" content="0; URL=wadge/index.html">
<link rel="canonical" href="https://${{ github.repository_owner }}.github.io/wadge/wadge/index.html">
EOF
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
Expand Down Expand Up @@ -345,7 +345,7 @@ jobs:
echo "prerelease=true" >> "$GITHUB_OUTPUT"
fi
- name: publish west to crates.io
- name: publish wadge to crates.io
run: |
pkgver=$(cargo pkgid | cut -d '@' -f 2)
tagver="${{ steps.ctx.outputs.version }}"
Expand All @@ -360,10 +360,10 @@ jobs:
path: artifacts

- run: |
mkdir -p ./libwest
for dir in ./artifacts/west-*; do
target=${dir#./artifacts/west-}
mv ${dir}/lib/libwest_sys.a ./libwest/libwest-${target}.a
mkdir -p ./libwadge
for dir in ./artifacts/wadge-*; do
target=${dir#./artifacts/wadge-}
mv ${dir}/lib/libwadge_sys.a ./libwadge/libwadge-${target}.a
done
- uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
Expand All @@ -372,5 +372,5 @@ jobs:
prerelease: true
generate_release_notes: true
files: |
./libwest/*
./libwadge/*
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
*.wasm
*.a
*.lib
west_bindings_test.go
wadge_bindings_test.go
/go/internal/tests/*/bindings/*
82 changes: 41 additions & 41 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "west"
version = "0.2.1"
description = "WebAssembly component test runtime"
name = "wadge"
version = "0.3.0"
description = "WAdge runtime"

authors.workspace = true
categories.workspace = true
Expand Down Expand Up @@ -32,15 +32,15 @@ members = ["crates/*", "tests/components/*"]
authors = ["Roman Volosatovs <[email protected]>"]
categories = ["wasm"]
edition = "2021"
homepage = "https://github.com/wasmCloud/west"
homepage = "https://github.com/wasmCloud/wadge"
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/wasmCloud/west"
repository = "https://github.com/wasmCloud/wadge"

[profile.release.package.west-passthrough]
[profile.release.package.wadge-passthrough]
opt-level = 's'
strip = true

[profile.release.package.west-sys]
[profile.release.package.wadge-sys]
opt-level = 's'
strip = true

Expand Down Expand Up @@ -78,6 +78,7 @@ http = { version = "1", default-features = false }
tokio = { version = "1", default-features = false }
tracing = { version = "0.1", default-features = false }
tracing-subscriber = { version = "0.3", default-features = false }
wadge = { version = "0.3", path = "." }
wasi-passthrough = { version = "0.3.2", default-features = false }
wasi-passthrough-ext = { version = "0.1.4", default-features = false }
wasi-passthrough-keyvalue = { version = "0.1.1", default-features = false }
Expand All @@ -90,6 +91,5 @@ wasmtime-wasi = { version = "25", default-features = false }
wasmtime-wasi-http = { version = "25", default-features = false }
wasmtime-wasi-keyvalue = { version = "25", default-features = false }
wasmtime-wasi-runtime-config = { version = "25", default-features = false }
west = { version = "0.2", path = "." }
wit-bindgen = { version = "0.32", default-features = false }
wit-component = { version = "0.217", default-features = false }
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Description

`west` is a testing framework, which lets you test your WebAssembly applications natively and using all your existing development tools (e.g. debuggers).
`wadge` is a testing framework, which lets you test your WebAssembly applications natively and using all your existing development tools (e.g. debuggers).

## Go

`west` provides `west-bindgen-go` utility, which walks the complete AST of your application and generates a binding file, which replaces functions with `wasmimport` directives, normally provided by the runtime, by a native implementation, which invokes those imports on a WebAssembly component (harness) running in an embedded Wasmtime instance. This lets you test you applications without changing implementation and achieving full test coverage.
`wadge` provides `wadge-bindgen-go` utility, which walks the complete AST of your application and generates a binding file, which replaces functions with `wasmimport` directives, normally provided by the runtime, by a native implementation, which invokes those imports on a WebAssembly component (harness) running in an embedded Wasmtime instance. This lets you test you applications without changing implementation and achieving full test coverage.

# Design

`west` uses [`cabish`](https://github.com/wasmCloud/cabish) to read and write values over FFI to pass to embedded Wasmtime instance.
`wadge` uses [`cabish`](https://github.com/wasmCloud/cabish) to read and write values over FFI to pass to embedded Wasmtime instance.
Loading

0 comments on commit 28a3562

Please sign in to comment.