cairo icon indicating copy to clipboard operation
cairo copied to clipboard

feat: (try) Support u384 numeric literals

Open feltroidprime opened this issue 6 months ago • 0 comments

u384 takes 4-5 lines to write as constant or in tests, so this would improve a lot readability and dev experience

Currently i've added

  • the trait implementation in cairo in circuits.cairo
  • a simple test in circuit_test.cairo
  • a branch in the function validate_literal in crates/cairo-lang-semantic/src/corelib.rs for the type
  • a branch in the function value_as_const_value in crates/cairo-lang-semantic/src/items/constant.rs to split the limbs for the type

However when running ./scripts/cairo_test.sh the issue is that get_core_ty_by_name(db, "u384".into(), vec![]) says that u384 doesn't exist (Unknown type)

Would appreciate some help from this point. Thank you!

This change is Reviewable

feltroidprime avatar Aug 06 '24 00:08 feltroidprime