kkrt-labs / cairo-vm-ts

A typescript implementation of the Cairo VM
Apache License 2.0
20 stars 13 forks source link

feat: Cairo 1 programs and Hint processor #97

Closed zmalatrax closed 4 months ago

zmalatrax commented 4 months ago

WIP This PR allows executing Cairo programs (v2.6.4, maybe previous version before Sierra changes). It uses the *.casm.json compilation artifacts from the command sierra-compile-json

Currently to run Cairo programs, a flag --cairo-1 has been added to the cairo run subcommand. It successfully ran add.cairo.

cairo run --cairo-1 cairo_programs/cairo/add.casm.json

Some refactoring are still needed I think, and then implementing the Cairo 1 hint processor is the next step (which is pretty straightforward).

Still needs to update the CI and add more tests for Cairo programs

zmalatrax commented 4 months ago

Trunk tries to format Cairo programs with the Cairo Zero cairo-format

The new cairo format should be configured and used on Cairo programs.