Skip to content

Commit

Permalink
add js sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed Jan 9, 2025
1 parent 3c284d7 commit 040e286
Show file tree
Hide file tree
Showing 23 changed files with 4,642 additions and 32 deletions.
5 changes: 5 additions & 0 deletions .changeset/initial_js_sdk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
sia_js: patch
---

# Initial JS SDK
26 changes: 26 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,29 @@ jobs:
run: cargo clippy -- -D warnings
- name: Test
run: cargo test
sia_js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Environment
run: |
rustup update stable
cargo install wasm-pack
- name: Test Browser JS
working-directory: sia_js
run: |
wasm-pack test --headless --${{matrix.browser}} -- --features=test_in_browser
- name: Test JS Firefox
working-directory: sia_js
run: |
wasm-pack test --headless --firefox -- --features=test_in_browser
- name: Test JS node.js
working-directory: sia_js
run: |
wasm-pack test --node
- name: Build JS node.js
working-directory: sia_js
run: wasm-pack build --target=nodejs
- name: Build JS browser
working-directory: sia_js
run: wasm-pack build --target=web
160 changes: 129 additions & 31 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[workspace]
resolver = "2"
members = ["sia", "sia_derive"]
members = ["sia", "sia_derive", "sia_js"]
4 changes: 4 additions & 0 deletions knope.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ changelog = "sia/CHANGELOG.md"
versioned_files = ["sia_derive/Cargo.toml"]
changelog = "sia_derive/CHANGELOG.md"

[packages.sia_js]
versioned_files = ["sia_js/Cargo.toml"]
changelog = "sia_js/CHANGELOG.md"

[[workflows]]
name = "document-change"

Expand Down
6 changes: 6 additions & 0 deletions sia_js/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/target
**/*.rs.bk
Cargo.lock
bin/
pkg/
wasm-pack.log
Loading

0 comments on commit 040e286

Please sign in to comment.