add pinocchio repository-layout example#582
Open
MarkFeder wants to merge 3 commits into
Open
Conversation
Ports the carnival program from anchor/native to a Pinocchio variant mirroring the same module layout (lib/processor/instructions/state/error). - #![no_std] crate using pinocchio + pinocchio-log - Instruction data wire format matches the native borsh layout, so the bankrun test reuses the same encoding - Static const tables replace heap-allocated Vec<FoodStand|Game|Ride>
edc8357 to
32719ae
Compare
Generated via pnpm install; required for CI's pnpm install --frozen-lockfile.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
basics/repository-layout(the carnival program) to a Pinocchio variant, mirroring the existing anchor + native module layout (lib,processor,instructions/*,state/*,error).#![no_std], usespinocchio+pinocchio-log, and replaces the heap-allocatedVec<FoodStand|Game|Ride>lookups with&'staticconst tables.nativeborsh layout, so the bankrun test reuses the same encoding (just with a different program name).Test plan
cargo check -p repository-layout-pinocchio-program— cleancargo build -p repository-layout-pinocchio-program— cleanbiome check --write— formatting cleanpnpm build-and-test(cargo build-sbf + bankrun) reproduced locally in arust:latestDocker container with Solana CLI stable. All 3 bankrun tests pass — every dispatch path exercised (rides, games, food; ticket-check, height-check, and happy-path branches all hit).pnpm build-and-teston stable + beta. Workflow runs are pending maintainer approval (action_required).