-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: initial wasm/ts/js bindings (#1079)
- Loading branch information
1 parent
10a7970
commit 2899cdd
Showing
23 changed files
with
10,676 additions
and
7 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,63 @@ | ||
name: JS bindings CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
paths: | ||
# When we change pyproject.toml, we want to ensure that the maturin builds still work | ||
- test-data/** | ||
- crates/** | ||
- Cargo.* | ||
|
||
# When something in the bindings themselves changes | ||
- 'js-rattler/**/*' | ||
|
||
# Or when this workflow changes | ||
- '.github/workflows/js-bindings.yml' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
format_lint_test: | ||
name: Format, Lint and Test the JS bindings | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [ '20.x' ] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
components: clippy, rustfmt | ||
target: wasm32-unknown-unknown | ||
|
||
- name: Run rustfmt | ||
uses: actions-rust-lang/rustfmt@v1 | ||
with: | ||
manifest-path: js-rattler/Cargo.toml | ||
|
||
- name: Run clippy | ||
run: cargo clippy --all-targets | ||
working-directory: js-rattler | ||
|
||
- run: npm ci | ||
working-directory: js-rattler | ||
- run: npm run fmt | ||
working-directory: js-rattler | ||
- run: npm run build --if-present | ||
working-directory: js-rattler | ||
- run: npm test | ||
working-directory: js-rattler |
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
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
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-unknown-unknown" |
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,8 @@ | ||
/target | ||
**/*.rs.bk | ||
bin/ | ||
pkg/ | ||
dist/ | ||
node_modules/ | ||
wasm-pack.log | ||
!Cargo.lock |
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,7 @@ | ||
{ | ||
"tabWidth": 4, | ||
"semi": true, | ||
"trailingComma": "all", | ||
"useTabs": false, | ||
"plugins": ["prettier-plugin-jsdoc"] | ||
} |
Oops, something went wrong.