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

feat!: next generation of Rust CDK #521

wants to merge 10 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]>
}

/// Sends the call and decodes the reply to a Candid type with a decoding quota.
fn call_with_decoder_config<R: for<'b> ArgumentDecoder<'b>>(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With best-effort call, we can merge this function with the original call function. If the call is best-effort, put a decoding quota, if it's not, decode without the quota.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "decoding quota" and "best effort response" are orthogonal concepts. And they affect different stages of the inter-canister call. So I insist on keeping them separate.

* 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
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