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(cyclesledger): Generate Rust types #4023

Merged
merged 8 commits into from
Dec 19, 2024
Merged

feat(cyclesledger): Generate Rust types #4023

merged 8 commits into from
Dec 19, 2024

Conversation

bitdivine
Copy link
Member

@bitdivine bitdivine commented Dec 18, 2024

Motivation

We would like to auto-generate the bindings used when calling other canisters. We are doing this a step at a time, starting with the cycles ledger, which is an easy choice as it doesn't change much.

Changes

  • Generate types for the cycles ledger client.
    • The types have been removed from the manually generated and modified client.

Tests

The binding command is run as part of CI, so we will see if the bindings are out of date.

@bitdivine bitdivine changed the title feat(cycles_ledger): Generate Rust types feat(ledger): Generate Rust types Dec 18, 2024
@bitdivine bitdivine changed the title feat(ledger): Generate Rust types feat(cyclesledger): Generate Rust types Dec 18, 2024
.github/workflows/binding-checks.yml Outdated Show resolved Hide resolved
scripts/bind/rust.sh Show resolved Hide resolved
scripts/bind/rust.sh Show resolved Hide resolved
src/cycles_ledger/client/src/lib.rs Outdated Show resolved Hide resolved
src/cycles_ledger/client/Cargo.toml Outdated Show resolved Hide resolved
scripts/generate.sh Outdated Show resolved Hide resolved
@bitdivine bitdivine marked this pull request as ready for review December 19, 2024 03:57
@bitdivine bitdivine requested a review from a team as a code owner December 19, 2024 03:57
@bitdivine bitdivine enabled auto-merge (squash) December 19, 2024 03:59
@peterpeterparker
Copy link
Member

with the cycles ledger,

There is a crate for ICRC types, just saying.

@bitdivine
Copy link
Member Author

@peterpeterparker I'm aware. It is limited though, whereas this machinery works for all canisters and provides things such as pocket-ic bindings, that the ICRC crate doesn't provide.

Copy link
Contributor

@DenysKarmazynDFINITY DenysKarmazynDFINITY left a comment

Choose a reason for hiding this comment

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

LGTM

P.S.: thanks for the comments, they are really helpful 🙂

@bitdivine bitdivine merged commit 6718c7e into main Dec 19, 2024
29 checks passed
@bitdivine bitdivine deleted the bindings-slice branch December 19, 2024 10:24
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.

3 participants