bug: `handle_main_return_value` cannot return a ByteArray
enitrat opened this issue · 2 comments
Bug Report
Cairo version:
2.8.4
Current behavior:
cairo/crates/cairo-lang-runner/src/lib.rs
Lines 480 to 509 in d7813fb
Where a println!
would print: [1, 2, 3, 420]
, the returned values are [0x1e50, 0x1e50, 0x225b312c20322c20332c203432305d22, 0x10]
It seems that bytearrays, and in general, any pointer-based struct, cannot be returned.
Expected behavior:
This should return the serialized bytearray representation for the above, which would be [0, 0x225b312c20322c20332c203432305d22, 0x10]
what are you trying to use it for?
note that this is a structure for only for debug and test runs for the time being - not for actual provable calculation.
A custom test runner. I use cairo-run to output JSON representations of my types as bytearrays. The goal is to use this test runner for property testing / diff testing