Skip to content

Integrating pinocchio and SDK types #111

Open
@febo

Description

@febo

Problem

Pinocchio re-implements many types from Solana SDK to avoid non-essential dependencies. Since now the SDK has been divided into separate crates and they are much leaner in terms of external (non-SDK) dependencies, it is possible to use them in pinocchio. The main benefit is to make it easier to write code that works with both SDK and pinocchio once they share the same basic types.

Pinocchio will continue to be a zero-dependency library, with the caveat that "zero-dependency" means zero external (non-SDK) dependencies. Therefore, it will continue to mitigate dependency issues. It will also continue to be a zero-copy first library, redefining or creating new types when needed.

The principle of "zero-dependencies" is not to avoid having external dependencies at all, but to have them opt-in – it should always be possible to write a full-featured program without external dependencies.

This issue is used to track the different PRs that bring SDK types into pinocchio in preparation for the next release.

Current dependency tree

pinocchio
├── solana-account-view 
│   ├── solana-address
│   └── solana-program-error
├── solana-address
│   ├── solana-define-syscall
│   └── solana-program-error
└── solana-program-error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions