ava-labs / hypersdk

Opinionated Framework for Building Hyper-Scalable Blockchains on Avalanche
Other
202 stars 109 forks source link

Check for necessary dependencies in build-script #1213

Open richardpringle opened 3 months ago

richardpringle commented 3 months ago

There might be a better way to do this, but currently, all programs require borsh as a dependency and if they use state, they require bytemuck. If you don't supply either of those dependencies, the error messages from the compiler aren't super intuitive. I'm proposing that we do a check in the build-script.

richardpringle commented 3 months ago

Turns out I found a way to solve this. I can either derive Zeroable and Pod, instead of NoUninit... or bytemuck can accept my PR: https://github.com/Lokathor/bytemuck/pull/259

I think them accepting my PR is the cleaner solution as I don't think we need to be as strict as Pod and Zeroable