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(test): Skeleton binding crates #3866

Merged
merged 12 commits into from
Dec 17, 2024
Merged

feat(test): Skeleton binding crates #3866

merged 12 commits into from
Dec 17, 2024

Conversation

bitdivine
Copy link
Member

@bitdivine bitdivine commented Dec 5, 2024

Motivation

We would like comprehensive pocket-ic tests for Oisy.

To that end, we would like to generate canister bindings to be used in pocket-ic tests rather than maintaining the bindings manually. We will start with the ledger bindings, then move on to the chain fusion signer and rewards canisters.

There already bindings for use inside a canister. There is a TODO to autogenerate them.

However it is inconvenient and sometimes very confusing if the API types are generated twice, with identical names. We will therefore make didc generate a file with just Rust types, and the two (pocket-ic and canister) bindings will use those shared types.

A further constraint is that pocket-ic and canister bindings cannot be compiled together into the same crate. We therefore need three separate crates for types, pocket-ic bindings and internal canister bindings.

There is quite a lot to do here, so we break it down into small steps.

Changes

  • Create the Rust crates needed to support pocket-ic and types bindings.

Tests

  • Existing CI should verify that the crates are well formed.
  • The crates are currently empty, so there is nothing else to test at this time.

@bitdivine bitdivine changed the title Bindings slice feat(test): Skeleton binding crates Dec 5, 2024
Cargo.toml Show resolved Hide resolved
@bitdivine bitdivine marked this pull request as ready for review December 17, 2024 02:37
@bitdivine bitdivine requested a review from a team as a code owner December 17, 2024 02:37
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, thanks

@bitdivine bitdivine enabled auto-merge (squash) December 17, 2024 10:15
@bitdivine bitdivine merged commit 35d499b into main Dec 17, 2024
29 checks passed
@bitdivine bitdivine deleted the bindings-slice branch December 17, 2024 10:37
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