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 19 commits into
base: main
Choose a base branch
from
Draft

feat!: next generation of Rust CDK #521

wants to merge 19 commits into from

Conversation

lwshang
Copy link
Contributor

@lwshang lwshang commented Oct 4, 2024

SDK-1853

Description

This PR collects a few big changes:

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

lwshang and others added 6 commits June 17, 2024 21:16
* Add RejectionCode variant SysUnknown

* refactor: Call struct

* encode_args once

* update ic0 with new system API

* with_best_effort_response()

* doc comments

* safe wrapper for msg_deadline()

* refactor

* add e2e

* state machine script using git tag

* basic test pass

* configs after setting args

* call_and_forget

* minor improvements

* use recent beta dfx which has new system API

* clippy

* load.bash

* update candid-extractor

* fmt

* group methods in traits

* default to 10s timeout:wq

* prelude mod

* fmt
* ic0: handle 32/64-bits system API

* adjust safe bindings

* update safety notes

* Update call.rs

Co-authored-by: Adam Spofford <[email protected]>

---------

Co-authored-by: Adam Spofford <[email protected]>
* Add ic-cdk-management-canister crate

* move management canister code

* flat hierarchy and exclude candid-extractor

* exclude root Cargo.lock

* rm docs

* update workflows

* fmt

* fix doc

* cleanup examples.yml

* rm candid-extractor

* fix examples.yml

* fix cont.

* refactor e2e-tests

1:1 mapping of canisters to tests

* remove examples
…same name as the function itself (#525)

* add a test case to reveal the bug

* fix: update/query macro could not handle function arguments with the same name as the function itself

* changelog
* duplicate call.rs in crate root

* keep only the new call API in root call.rs

* CallResult<R> = Result<R, CallError>;

* RejectCode & CallPerformErrorCode

* remove CleanupExecuted

* try add CandidEncodeFailed error type

* handle CandidEncodeFailed error properly

* copy api/call.rs from main branch and fix for new ic0

* test all Call struct variants and rename ArgDecoderConfig to DecoderConfig

* specify CallPerformErrorCode variants
* e2e revails: Call without args fails

* fix and e2e call thoroughly

* move call internal items

* unify wording about cycles

* CallWithArg which allow non-tuple arg

* docs

* with_decoder_config instead of call_with_decoder_config

* rename: call -> call_tuple, call_and_forget -> call_oneway

* call() allows non-tuple return types
@lwshang lwshang mentioned this pull request Dec 19, 2024
3 tasks
* wip

* pocket-ic must be in dev dependencies

* conditional compilation for wasm target_family

* cleanup

* CI wasm64

* fix ci.yml

* fix cont.

* no fail-fast

* rm e2e-tests/src/lib.rs
* deprecated annotations with note

* update ic-ledger-types

* RejectCode and CallPerformErrorCode have NoError variant

* ic-cdk-timers migrate to Call::new

* fix deprecation usage in async e2e

* fix doctests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants