cairo-vm icon indicating copy to clipboard operation
cairo-vm copied to clipboard

docs: Align BuiltinHintProcessor README with current cairo-vm API

Open sashass1315 opened this issue 1 month ago • 1 comments

The README under docs/hint_processor/builtin_hint_processor was using legacy types and call patterns that no longer match the codebase. I updated all examples and guidance to the current API: hint functions now use VirtualMachine, Felt252 constants and return HintError; add_hint requires Rc; BuiltinHintProcessor::new takes a preset HashMap<String, Rc> and a RunResources; cairo_run now receives program bytes together with a CairoRunConfig. Error handling was also corrected to use HintError::CustomHint. These changes are verified against builtin_hint_processor_definition.rs, cairo_run.rs, hint_errors.rs and the canonical example at examples/custom_hint/src/main.rs to ensure accuracy and prevent confusion for users integrating custom hints.

sashass1315 avatar Nov 26 '25 09:11 sashass1315

Hi @sashass1315, thanks for contributing, Could you please add the corresponding changelog entry?

gabrielbosio avatar Dec 02 '25 18:12 gabrielbosio

Sorry, @sashass1315, because this PR only changes documentation the changelog entry is not necessary, my bad. Could you please revert the commit that updates the changelog? Thanks!

gabrielbosio avatar Dec 22 '25 16:12 gabrielbosio

Sorry, @sashass1315, because this PR only changes documentation the changelog entry is not necessary, my bad. Could you please revert the commit that updates the changelog? Thanks!

updated

sashass1315 avatar Dec 22 '25 17:12 sashass1315