-
Notifications
You must be signed in to change notification settings - Fork 48
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
replace copy-pasted syscall code with crate import #63
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
personally I like that change, it makes code cleaner IMO.
also, Pinocchio is already dependent on five8, so I don't think adding one more small lib (literally 150 LOC) is going against the philosophy of the project
Thanks for the PR - agree that having the code copied is not the best approach. But I wonder if we can discuss whether there is another alternative or not. Let's take the example of the
One advantage of 2) is that additional dependencies are "opt-in" – you only need In this particular case ( Do you think this (or a variation) could work? |
So the syscall wrappers (e.g. |
We could move I think we don't need a |
And what about the syscall wrappers in log.rs, memory.rs and program.rs? |
We could move them to different crates:
The |
@kevinheavey As a side note, we should do the same with the sysvars – make them to be "opt-in", since not all programs use them. |
The contents of syscalls.rs were just copied from Agave and now that code lives in its own crate. There is nothing in solana-define-syscall that pinocchio was not vendoring so this adds no bloat.
Also I had to remove some mentions of "no dependencies" and couldn't think of appropriate song lyrics to replace the existing ones