Skip to content

Commit

Permalink
fix: Update rust composite query to work again (#698)
Browse files Browse the repository at this point in the history
This PR fixes the rust composite query to work again. Some of the changes:

Move dfx.json in the top level project directory for rust composite queries to not confuse dfx.
Add a Cargo.lock as per usual practice.
Use proper rust targets for the canisters.
Update readme and instructions a bit to build both the data partition and kv_frontend before installing the frontend and running queries against it.
  • Loading branch information
dsarlis authored Feb 7, 2024
1 parent 663db6a commit 781b9e8
Show file tree
Hide file tree
Showing 8 changed files with 1,402 additions and 37 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/rust-composite_query-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ jobs:
run: bash .github/workflows/provision-darwin.sh
- name: Rust composite_query Darwin
run: |
dfx start --background
pushd rust/composite_query
dfx start --background
dfx canister create data_partition
dfx build data_partition
dfx canister create kv_frontend
dfx build kv_frontend
dfx canister install kv_frontend
dfx canister call kv_frontend put '(1, 1337)'
dfx canister call kv_frontend get '(1)' | grep 1337
dfx canister call kv_frontend get '(1)' | grep '1_337'
popd
rust-composite_query-linux:
runs-on: ubuntu-20.04
Expand All @@ -38,11 +40,13 @@ jobs:
run: bash .github/workflows/provision-linux.sh
- name: Rust composite_query Linux
run: |
dfx start --background
pushd rust/composite_query
dfx start --background
dfx canister create data_partition
dfx build data_partition
dfx canister create kv_frontend
dfx build kv_frontend
dfx canister install kv_frontend
dfx canister call kv_frontend put '(1, 1337)'
dfx canister call kv_frontend get '(1)' | grep 1337
dfx canister call kv_frontend get '(1)' | grep '1_337'
popd
Loading

0 comments on commit 781b9e8

Please sign in to comment.