Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: next generation of Rust CDK #521

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
279de07
feat: struct Call to support best effort responses (#496)
lwshang Jun 18, 2024
36c837b
Merge branch 'main' into next
lwshang Sep 3, 2024
107fa7d
feat!: ic0 handles 32/64-bit system API (#514)
lwshang Sep 3, 2024
1d99280
Merge branch 'main' into next
lwshang Sep 18, 2024
b10be57
Merge branch 'main' into next
lwshang Oct 4, 2024
3d06c9e
non-beta dfx in examples.yml
lwshang Oct 4, 2024
7a64c21
refactor!: crates architecture (#522)
lwshang Oct 9, 2024
69a459d
bump crates to alpha.1 (#524)
lwshang Oct 11, 2024
69d98b0
fix: update/query macro could not handle function arguments with the …
lwshang Oct 11, 2024
907b7d9
Merge branch 'main' into next
lwshang Nov 12, 2024
a061429
move back management_canister mod (#533)
lwshang Dec 4, 2024
605abca
Merge branch 'main' into next
lwshang Dec 4, 2024
9f9c0f7
feat: root call mod with new CallError (#535)
lwshang Dec 11, 2024
d98a6ff
feat: no more tuples in Call (#539)
lwshang Dec 16, 2024
0ab2864
feat: root management canister mod with new bindings (#538)
lwshang Dec 18, 2024
65443f9
refactor: api module overhaul (#540)
lwshang Dec 19, 2024
921c858
Merge branch 'main' into next
lwshang Dec 19, 2024
e2bbc39
chore: e2e wasm64 (#534)
lwshang Dec 20, 2024
c2ba198
chore: deprecate old call API (#542)
lwshang Dec 20, 2024
14e10db
chore: deprecate other APIs in api/call.rs (#543)
lwshang Jan 3, 2025
3184c9c
feat: macros that decoding arguments can set custom decoder using dec…
lwshang Jan 10, 2025
5fb07f5
feat: safe binding for msg_deadline (#545)
lwshang Jan 13, 2025
710fc59
chore: deprecate remaining items in api/call.rs (#546)
lwshang Jan 15, 2025
68f98ce
feat: CallError redesign (#548)
lwshang Jan 16, 2025
4e287ce
chore: call module followup (#549)
lwshang Jan 17, 2025
7349253
refactor: type crates (#550)
lwshang Jan 22, 2025
d823cb5
feat: simplify Call implementation and enable retry logic (#551)
lwshang Jan 24, 2025
b8f9b27
feat: executor v3 (#555)
adamspofford-dfinity Feb 12, 2025
d31d821
feat: management canister types v0.2.0 which ensures Candid equality …
michael-weigelt Feb 18, 2025
2255afa
feat: finalize call api (#557)
lwshang Feb 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 47 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ concurrency:
jobs:
build:
name: cargo build
runs-on: ubuntu-24.04
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-13-large]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -34,8 +38,8 @@ jobs:
${{ runner.os }}-
- name: Run builds
run: |
cargo build --workspace --exclude ic-cdk-e2e-tests --exclude candid-extractor --target wasm32-unknown-unknown
cargo build --workspace --exclude ic-cdk-e2e-tests --exclude candid-extractor --target wasm32-unknown-unknown --release
cargo build --workspace --exclude ic-cdk-e2e-tests --target wasm32-unknown-unknown
cargo build --workspace --exclude ic-cdk-e2e-tests --target wasm32-unknown-unknown --release
cargo build --example=work

test:
Expand All @@ -44,6 +48,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-24.04, macos-13-large]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -66,9 +71,43 @@ jobs:
- name: Run tests
run:
| # https://github.com/rust-lang/cargo/issues/6669 we have to run ALL tests with two commands
cargo test --all-targets
cargo test --all-targets --no-fail-fast
cargo test --doc

wasm64:
name: wasm64 e2e
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-13-large]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-wasm64-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
restore-keys: |
${{ runner.os }}-wasm64-
${{ runner.os }}-
- name: Download pocket-ic
run: |
bash scripts/download_pocket_ic.sh
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
components: rust-src
- name: Run tests
run:
WASM64=1 cargo test --package ic-cdk-e2e-tests --no-fail-fast

fmt:
name: cargo fmt
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -141,7 +180,7 @@ jobs:
aggregate:
name: ci:required
if: ${{ always() }}
needs: [build, test, fmt, clippy, doc]
needs: [build, test, wasm64, fmt, clippy, doc]
runs-on: ubuntu-24.04
steps:
- name: check build result
Expand All @@ -150,6 +189,9 @@ jobs:
- name: check test result
if: ${{ needs.test.result != 'success' }}
run: exit 1
- name: check wasm64 result
if: ${{ needs.wasm64.result != 'success' }}
run: exit 1
- name: check fmt result
if: ${{ needs.fmt.result != 'success' }}
run: exit 1
Expand Down
132 changes: 0 additions & 132 deletions .github/workflows/examples.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/release-candid-extractor.yml

This file was deleted.

11 changes: 4 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ target/
# DFX
.dfx/

# Include root Cargo.toml to build candid-extractor with `--locked`
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
# The root Cargo.lock is ignored because the workspace only has library crates.
# The candid-extractor has its own Cargo.lock file which is tracked to build the binary.
Cargo.lock
examples/*/Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk
.DS_Store

# The pocket-ic server binary installed by scripts/download_pocket_ic.sh
e2e-tests/pocket-ic

# Generated bindings
Expand Down
9 changes: 0 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +0,0 @@
[submodule "examples/bats/bats-core"]
path = examples/bats/bats-core
url = https://github.com/bats-core/bats-core.git
[submodule "examples/bats/bats-support"]
path = examples/bats/bats-support
url = https://github.com/bats-core/bats-support.git
[submodule "examples/bats/bats-assert"]
path = examples/bats/bats-assert
url = https://github.com/bats-core/bats-assert.git
Loading
Loading