Skip to content

Commit 38eaf93

Browse files
DSharifikvinwang
andauthored
refactor: break up dstack-sdk into two crates for no_std support (#272)
* . * Update CI to enforce wasm compatibility * revert name to dstack-sdk and re-export types for backwards compatibility * update workflow fo install wasm32 toolchain * rust-sdk: Update README * rust-sdk: Move back the crate path * rust-sdk: Replace x509-parser with pkcs8 for no_std * rust-sdk: Tune the deps for no_std * rust-sdk: Add test case for no_std --------- Co-authored-by: Kevin Wang <[email protected]>
1 parent f6b0927 commit 38eaf93

File tree

27 files changed

+1790
-5609
lines changed

27 files changed

+1790
-5609
lines changed

.github/workflows/sdk.yaml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ permissions:
44

55
on:
66
push:
7-
branches: [ master, next, dev-* ]
7+
branches: [master, next, dev-*]
88
pull_request:
9-
branches: [ master, next, dev-* ]
9+
branches: [master, next, dev-*]
1010

1111
env:
1212
CARGO_TERM_COLOR: always
@@ -15,12 +15,21 @@ jobs:
1515
sdk-tests:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v4
1919

20-
- name: Install Rust
21-
uses: dtolnay/[email protected]
22-
with:
23-
components: clippy, rustfmt
20+
- name: Install Rust
21+
uses: dtolnay/[email protected]
22+
with:
23+
components: clippy, rustfmt
24+
# This additional target is needed for wasm32 compatibility check.
25+
targets: wasm32-unknown-unknown
2426

25-
- name: SDK tests
26-
run: cd sdk && ./run-tests.sh
27+
- name: SDK tests
28+
run: cd sdk && ./run-tests.sh
29+
30+
- name: Verify WASM compilation
31+
# Ensures SDK types can be used in smart contracts
32+
run: cargo check --target=wasm32-unknown-unknown -p dstack-sdk-types
33+
34+
- name: Verify no_std compatibility
35+
run: cargo test -p dstack-sdk-types --test no_std_test --no-default-features

0 commit comments

Comments
 (0)