Skip to content

Commit

Permalink
Use return type info from sierra when serializing return values in ca…
Browse files Browse the repository at this point in the history
…iro1-run crate (#1665)

* Start implementing new serialize_output

* Handle enums

* Add extra handling for boolean enums

* Use new serialization in main loop

* Handle panic wrapper

* Fix panic handling

* Fix variant idx calc

* Add test for dict with struct

* Add Array & Snapshot

* Fix

* Handle box + fix spellings + update tests

* Update test value

* Add signed felt

* Add test for squashed dict

* Handle Nullable being Null

* Complete unhandled barnches

* Clippy

* Remove old impl of serialize_output

* Add Changelog entry

* Fix comments

* Remove empty case

* Fox typo

* Handle multiple array formats when serializing

* Add test

* Fix test value

---------

Co-authored-by: Pedro Fontana <fontana.pedro93@gmail.com>
  • Loading branch information
fmoletta and pefontana authored Mar 20, 2024
1 parent 0b6d116 commit bf7d707
Show file tree
Hide file tree
Showing 9 changed files with 576 additions and 139 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

#### Upcoming Changes

* feat(BREAKING): Use return type info from sierra when serializing return values in cairo1-run crate [#1665](https://github.com/lambdaclass/cairo-vm/pull/1665)
* Removed public function `serialize_output`.
* Add field `serialize_output` to `Cairo1RunConfig`.
* Function `cairo_run_program` now returns an extra `Option<String>` value with the serialized output if `serialize_output` is enabled in the config.
* Output serialization improved as it now uses the sierra program data to identify return value's types.

* feat: Create hyper_threading crate to benchmark the `cairo-vm` in a hyper-threaded environment [#1679](https://github.com/lambdaclass/cairo-vm/pull/1679)

* feat: add a `--tracer` option which hosts a web server that shows the line by line execution of cairo code along with memory registers [#1265](https://github.com/lambdaclass/cairo-vm/pull/1265)
Expand Down
1 change: 1 addition & 0 deletions cairo1-run/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ bincode.workspace = true
assert_matches = "1.5.0"
rstest = "0.17.0"
mimalloc = { version = "0.1.37", default-features = false, optional = true }
num-traits = { version = "0.2", default-features = false }

[features]
default = ["with_mimalloc"]
Expand Down
Loading

0 comments on commit bf7d707

Please sign in to comment.