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

FR: Provide a separate crate for solana_program::syscalls #34729

Open
mina86 opened this issue Jan 10, 2024 · 0 comments
Open

FR: Provide a separate crate for solana_program::syscalls #34729

mina86 opened this issue Jan 10, 2024 · 0 comments
Labels
community Community contribution

Comments

@mina86
Copy link

mina86 commented Jan 10, 2024

Problem

Any crate which wants to use Solana syscalls need to depend on the entire solana-program crate. This pulls in a lot of dependencies which is undesired for utility crates.

For a concrete example, I’m trying to modify ibc-rs to support Solana’s syscall for calculating SHA 256 but it doesn’t work out as easily as it could. In particular, I’m at the moment facing issues with zeroize dependency resolution.

Proposed Solution

Provide a solana-program-syscalls crate which exposes contents of the solana_program::syscalls module. solana-program crate would than depend on that new crate and simply include pub use solana_program_syscalls as syscalls; statement.

This would be mostly a trivial change except that some of the syscalls depend on data types such as Pubkey. Those would need to be included in that crate.

@mina86 mina86 added the community Community contribution label Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution
Projects
None yet
Development

No branches or pull requests

1 participant