v1.0.0-beta.2
Pre-release
Pre-release
1.0.0-beta.2 (2025-02-10)
⚠ BREAKING CHANGES
- check abi integer input is within signed range (#7316)
loop
statements (only frontend) (#7092)- Include kind in
StructDefinition::generics
and fix derivation of Eq in structs with numeric generics (#7076) - Handle generic fields in
StructDefinition::fields
and move old functionality toStructDefinition::fields_as_written
(#7067) - disallow calling unconstrained functions outside of
unsafe
blocks and passing unconstrained functions in place of constrained functions (#6938) - Disable mocks in
execute
(#6869) - require trait primitive functions/calls to have their trait in scope (#6901)
- Reserve
enum
andmatch
keywords (#6961) - require trait method calls (
foo.bar()
) to have the trait in scope (imported) (#6895) - type-check trait default methods (#6645)
- update
aes128_encrypt
to return an array (#6973) - turn TypeIsMorePrivateThenItem into an error (#6953)
- turn CannotReexportItemWithLessVisibility into an error (#6952)
- Switch to using
jsonrpsee
for foreign calls; refactorrun_test
; foreign call layering (#6849)
Features
--pedantic-solving
flag (#6716) (5b9a113)assert
andassert_eq
are now expressions (#7313) (9ae3c6c)loop
keyword in runtime and comptime code (#7096) (c4f183c)loop
must have at least onebreak
(#7126) (8804f0a)loop
statements (only frontend) (#7092) (48e613e)- Add
ConstrainNotEqual
instruction (#7032) (51180b9) - Add
noir-inspector
(#7136) (a0704aa) - Allow associated types to be ellided from trait constraints (#7026) (aa7b91c)
- Allow resolved types in constructors (#7223) (6d319af)
- Allow specifying multiple patterns in nargo test (#7186) (bd44e40)
- Auto-import traits when suggesting trait methods (#7037) (a9acf5a)
- Avoid generating a new witness when checking if linear expression is zero (#7031) (14c9237)
- Avoid inserting
inc_rc
instructions into ACIR (#7036) (2d316c2) - brillig: Set global memory size at program compile time (#7151) (7f9525d)
- brillig: SSA globals code gen (#7021) (82cb900)
- cli: Add CLI option to filter by contract function name (#7018) (fc5848c)
- comptime: Implement to_be_bits and to_le_bits in the interpreter (#7008) (a7eea81)
- Disable mocks in
execute
(#6869) (e71fcdf) - Disallow calling unconstrained functions outside of
unsafe
blocks and passing unconstrained functions in place of constrained functions (#6938) (2732947) - Don't report warnings for dependencies (#6926) (7cc8dbf)
- Don't simplify SSA instructions when creating them from a string (#6948) (da94c2b)
- experimental: Construct enum variants in expressions (#7174) (e338952)
- experimental: Implement enum tag constants (#7183) (0c6c637)
- experimental: Implement zeroed for enums (#7252) (b410f56)
- experimental: Parse match expressions (#7243) (97073b2)
- experimental: Support enums in comptime code (#7194) (4fe4cc6)
- experimental: Try to infer lambda argument types inside calls (#7088) (a3b823c)
- Handle generic fields in
StructDefinition::fields
and move old functionality toStructDefinition::fields_as_written
(#7067) (14a7e37) - Impl Default for U128 (#6984) (3c488f4)
- Infer lambda parameter types from return type and let type (#7267) (05dc343)
- Inline simple functions (#7160) (c17e228)
- Lock on Nargo.toml on several nargo commands (#6941) (54d81ca)
- LSP autocomplete module declaration (#7154) (1f1e750)
- LSP chain inlay hints (#7152) (1927bda)
- LSP: Auto-import trait reexport if trait is not visible (#7079) (197b02a)
- LSP: Code action to import trait in a method call (#7066) (3b8d1da)
- LSP: Suggest enum variants without parameters (#7261) (fc75298)
- LSP: Suggest trait methods from where clauses (#6915) (21eef0d)
- lsp: Use trait method docs for trait impl method docs on hover (#7003) (4d38a88)
- optimization: Add purity analysis to SSA (#7197) (9f21824)
- Parse globals in SSA parser (#7112) (fd3377b)
- Parser and formatter support for
enum
s (#7110) (7705a62) - Require trait function calls (
Foo::bar()
) to have the trait in scope (imported) (#6882) (a5447ed) - Require trait method calls (
foo.bar()
) to have the trait in scope (imported) (#6895) (d61633d) - Require trait primitive functions/calls to have their trait in scope (#6901) (56c931a)
- Resolve enums & prepare type system (#7115) (a1cf830)
- Simplify
Ord
implementation for arrays (#7305) (819a53a) - Simplify subtraction from self to return zero (#7189) (49d1b13)
- Skip codegen of zero iteration loops (#7030) (fa12b7f)
- SSA globals in monomorphization and SSA gen (#6985) (db28cb9)
- ssa: Add flag to DIE pass to be able to keep
store
instructions (#7106) (ed12ad7) - ssa: Expand feature set of the Brillig constraint check (#7060) (2d415ca)
- ssa: Hoist add and mul binary ops using known induction variables (#6910) (ebc4d2c)
- ssa: Immediately simplify away RefCount instructions in ACIR functions (#6893) (ab8807d)
- ssa: Pass to preprocess functions (#7072) (bc0c0ca)
- ssa: Reuse constants from the globals graph when making constants in a function DFG (#7153) (d3ca3b7)
- ssa: Treat globals as constant in a function's DFG (#7040) (1273ea4)
- Switch to using
jsonrpsee
for foreign calls; refactorrun_test
; foreign call layering (#6849) (51a4d5d) - Sync from noir (AztecProtocol/aztec-packages#11653) (058d1b0)
- test: Enable the test fuzzer for Wasm (#6835) (f4745d4)
- Turn CannotReexportItemWithLessVisibility into an error (#6952) (da18a12)
- Turn TypeIsMorePrivateThenItem into an error (#6953) (8b6f720)
- Type-check trait default methods (#6645) (8bb3908)
- Unchecked math operations in SSA (#7011) (f6ed6aa)
- Unconstrained optimizations for BoundedVec (#7119) (3597ffe)
- Update
aes128_encrypt
to return an array (#6973) (dcdccfc) - Warn on trait method visibility (#6923) (bb71bcb)
Bug Fixes
Function::is_no_predicates
always returned false for brillig f… (#7167) (8cab0e4)- Add missing
is_empty
check for enums (#7257) (a9e9850) - Allow calling trait impl method from struct if multiple impls exist (#7124) (966d8a6)
- Allow implicit associated types on integer type kinds (#7078) (f2a6d10)
- Allow multiple trait impls for the same trait as long as one is in scope (#6987) (7328f0b)
- Allows for infinite brillig loops (#7296) (87196e9)
- Always normalize ssa when priting at least one pass (#7299) (d327462)
- Avoid creating unnecessary memory blocks (#7114) (521f5ce)
- Avoid stack overflow on many comments in a row (#7325) (ac1da8f)
- Avoid type error when calling something with a type alias of a function (#7239) (429ae52)
- Bigint builtins are foreigns (#6892) (a1f9c94)
- brillig: Globals entry point reachability analysis (#7188) (bdcfd38)
- Check abi integer input is within signed range (#7316) (0d78578)
- Consistent file_id across installation paths (#6912) (baca790)
- Correct reversed callstacks (#7212) (dc06d8e)
- Defunctionalize pass on the caller runtime to apply (#7100) (dd70845)
- Do not emit range check for multiplication by bool (#6983) (c0a4010)
- Do not panic on indices which are not valid
u32
s (#6976) (bf474c0) - Do not remove memory blocks used as brillig input (#7073) (8d2a2dd)
- docs: Update broken links to EC lib (#7141) (ff55a77)
- Don't always select trait impl when verifying trait constraints (#7041) (ba07336)
- Don't always use an exclusive lock in
nargo check
(#7120) (bbdb937) - Don't fail parsing macro if there are parser warnings (#6969) (7f0067c)
- Ensure canonical bits decomposition (#7168) (3e2fe1f)
- Error on if without else when type mismatch (#7302) (25b989f)
- Error on missing function parameters (#6967) (38d429e)
- Error on trailing doc comment (#7300) (a252123)
- Include kind in
StructDefinition::generics
and fix derivation of Eq in structs with numeric generics (#7076) (f17b7cc) - Keep
inc_rc
for array inputs during preprocessing (#7163) (29d2d8a) - Let static_assert fail with the provided message (#7005) (268229e)
- Lock git dependencies folder when resolving workspace (#7327) (8502b8d)
- LSP hover over function with
&mut self
(#7155) (c8d5ce5) - LSP: Correct signature for assert and assert_eq (#7184) (b6fa180)
- lsp: Suggest all possible trait methods, but only visible ones (#7027) (7d46287)
- Mark field division and modulo as requiring predicate for all necessary types (#7290) (e476f95)
- nargo_fmt: Don't consider identifiers the same if they are equal… (#7043) (18ea051)
- nargo_fmt: Let doc comment could come after regular comment (#7046) (c3f8a46)
- Non-determinism from under constrained checks (#6945) (203242c)
- Perform SSA constraints check on final SSA (#7334) (d9ad0be)
- Preserve types when reading from calldata arrays (#7144) (f73dc9a)
- Prevent overlapping associated types impls (#7047) (ed9977a)
- Prevent panic within
remove_possibly_mutated_cached_make_arrays
(#7264) (130d991) - Proper cleanup when breaking from comptime loop on error (#7125) (bf32a22)
- Reduce memory usage in mem2reg (#7053) (a0ffedf)
- Remove unnecessary cast in bit-shift (#6890) (011fbc1)
- Remove unused brillig functions (#7102) (4727b16)
- Reproduce and fix bytecode blowup (#6972) (724547d)
- Require generic trait impls to be in scope to call them (#6913) (5300ec3)
- Return trait impl method as FuncId if there's only one (#6989) (8d7f1f9)
- Show output of
test_program_is_idempotent
on failure (#6942) (a690d96) - ssa: Only attempt to inline constant Brillig calls for entry points (#7260) (1ae035f)
- ssa: Resolve value before fetching from DFG in a couple cases (#7169) (39af02f)
- ssa: Unused functions removals post folding constant Brillig calls (#7265) (d5d6cb7)
- ssa: Use number of SSA instructions for the Brillig unrolling bytecode size limit (#7242) (8d39337)
- ssa: Use post order when mapping instructions in loop invariant pass (#7140) (b00facb)
- Start RC at 1 again (#6958) (6f086b3)
- unrolling: Fetch original bytecode size from the original function (#7253) (5841122)
- Wrong module to lookup trait when using crate or super (#6974) (74ec723)