-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from redbadger/wasip2-components
wasm32-wasip2 target
- Loading branch information
Showing
99 changed files
with
4,110 additions
and
1,610 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Build and test WebAssembly components | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- "wasm-components/**" | ||
|
||
pull_request: | ||
branches: | ||
- "main" | ||
paths: | ||
- "wasm-components/**" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build and test | ||
runs-on: ubuntu-latest | ||
if: | | ||
${{ github.event_name != 'pull_request' || | ||
github.event.pull_request.head.repo.full_name != | ||
github.event.pull_request.base.repo.full_name }} | ||
defaults: | ||
run: | ||
working-directory: wasm-components | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
targets: wasm32-wasip2 | ||
components: rustfmt | ||
|
||
- name: Build | ||
shell: bash | ||
working-directory: wasm-components/rust | ||
run: | | ||
cargo fmt --all --check | ||
cargo build --workspace | ||
- name: Install nextest | ||
shell: bash | ||
run: | | ||
set -euxo pipefail | ||
curl -LsSf https://get.nexte.st/0.9/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin | ||
- name: Run tests | ||
shell: bash | ||
working-directory: wasm-components/rust | ||
run: | | ||
rm .cargo/config.toml # so we don't attempt to execute wasm directly | ||
cargo nextest run --all-features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,5 @@ | |
build/ | ||
target/ | ||
keys/ | ||
**/wit/deps/* | ||
sentinel | ||
*.creds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[build] | ||
target = "wasm32-wasip2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Folder-specific settings | ||
// | ||
// For a full list of overridable settings, and general information on folder-specific settings, | ||
// see the documentation: https://zed.dev/docs/configuring-zed#settings-files | ||
{ | ||
"lsp": { | ||
"rust-analyzer": { | ||
"initialization_options": { | ||
"cargo": { | ||
"target": "wasm32-wasip2" | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.