diff --git a/air-script/Cargo.toml b/air-script/Cargo.toml index 151a2e1a..0e29b269 100644 --- a/air-script/Cargo.toml +++ b/air-script/Cargo.toml @@ -1,34 +1,34 @@ [package] name = "air-script" -version = "0.2.0" -description="AirScript language compiler" +version = "0.3.0" +description = "AirScript language compiler" authors = ["miden contributors"] -readme="README.md" +readme = "README.md" license = "MIT" repository = "https://github.com/0xPolygonMiden/air-script" documentation = "https://0xpolygonmiden.github.io/air-script/" categories = ["compilers", "cryptography"] keywords = ["air", "stark", "zero-knowledge", "zkp"] edition = "2021" -rust-version = "1.65" +rust-version = "1.67" [[bin]] name = "airc" path = "src/main.rs" [dependencies] -air-ir = { path = "../ir", version = "0.2.0" } -air-parser = { path = "../parser", version = "0.2.0" } -air-pass = { path = "../pass", version = "0.1.0" } -air-codegen-winter = { path = "../codegen/winterfell", version = "0.2.0" } -air-codegen-masm = { path = "../codegen/masm" } -env_logger = "0.10.0" +air-ir = { package = "air-ir", path = "../ir", version = "0.3" } +air-parser = { package = "air-parser", path = "../parser", version = "0.3" } +air-pass = { package = "air-pass", path = "../pass", version = "0.1" } +air-codegen-masm = { package = "air-codegen-masm", path = "../codegen/masm", version = "0.1" } +air-codegen-winter = { package = "air-codegen-winter", path = "../codegen/winterfell", version = "0.3" } +clap = {version = "4.2", features = ["derive"] } +env_logger = "0.10" log = { version = "0.4", default-features = false } -miden-diagnostics = { git = "https://github.com/0xPolygonMiden/miden-diagnostics" } -clap = {version = "4.2", features = ["derive"]} +miden-diagnostics = "0.1" [dev-dependencies] -winter-air = { package = "winter-air", version = "0.5.1", default-features = false } -winter-math = { package = "winter-math", version = "0.5.1", default-features = false } -winter-utils = { package = "winter-utils", version = "0.5.1", default-features = false } -expect-test = "1.4.0" +expect-test = "1.4" +winter-air = { package = "winter-air", version = "0.6", default-features = false } +winter-math = { package = "winter-math", version = "0.6", default-features = false } +winter-utils = { package = "winter-utils", version = "0.6", default-features = false } diff --git a/codegen/masm/Cargo.toml b/codegen/masm/Cargo.toml index 69508e7a..2a2d9dfb 100644 --- a/codegen/masm/Cargo.toml +++ b/codegen/masm/Cargo.toml @@ -1,18 +1,27 @@ [package] name = "air-codegen-masm" version = "0.1.0" +description = "Miden Assembly code generator for the AirScript language" +authors = ["miden contributors"] +readme = "README.md" +license = "MIT" +repository = "https://github.com/0xPolygonMiden/air-script" +categories = ["compilers", "cryptography"] +keywords = ["air", "stark", "winterfell", "zero-knowledge", "zkp"] edition = "2021" +rust-version = "1.67" [dependencies] -air-ir = { path = "../../ir", version = "0.2.0" } +air-ir = { package = "air-ir", path = "../../ir", version = "0.3" } anyhow = "1.0" -winter-prover = { version = "0.6", default-features = false } -miden-processor = { git = "https://github.com/0xPolygonMiden/miden-vm", features = ["internals"], default-features = false } +miden-core = { package = "miden-core", version = "0.6", default-features = false } thiserror = "1.0" +winter-math = { package = "winter-math", version = "0.6", default-features = false } [dev-dependencies] -air-parser = { path = "../../parser", version = "0.2.0" } +air-parser = { path = "../../parser" } air-pass = { path = "../../pass" } -miden = "0.3.0" -miden-diagnostics = { git = "https://github.com/0xpolygonmiden/miden-diagnostics" } -miden-assembly = { git = "https://github.com/0xPolygonMiden/miden-vm", default-features = false } +miden-assembly = { package = "miden-assembly", version = "0.6", default-features = false } +miden-processor = { package = "miden-processor", version = "0.6", features = ["internals"], default-features = false } +miden-diagnostics = "0.1" +winter-air = { package = "winter-air", version = "0.6", default-features = false } diff --git a/codegen/masm/src/codegen.rs b/codegen/masm/src/codegen.rs index 7436db7e..741d75aa 100644 --- a/codegen/masm/src/codegen.rs +++ b/codegen/masm/src/codegen.rs @@ -13,10 +13,10 @@ use air_ir::{ Air, ConstraintDomain, ConstraintRoot, Identifier, NodeIndex, Operation, PeriodicColumn, TraceSegmentId, Value, }; -use miden_processor::math::{Felt, StarkField}; +use miden_core::{Felt, StarkField}; use std::collections::btree_map::BTreeMap; use std::mem::{replace, take}; -use winter_prover::math::fft; +use winter_math::fft; #[derive(Default)] pub struct CodeGenerator { diff --git a/codegen/masm/src/writer.rs b/codegen/masm/src/writer.rs index e445dbdd..823d605e 100644 --- a/codegen/masm/src/writer.rs +++ b/codegen/masm/src/writer.rs @@ -1,4 +1,4 @@ -use miden_processor::math::{Felt, StarkField}; +use miden_core::{Felt, StarkField}; use std::borrow::{Borrow, Cow}; #[derive(Debug, Clone, Copy)] diff --git a/codegen/masm/tests/test_divisor.rs b/codegen/masm/tests/test_divisor.rs index 5630a850..454bb039 100644 --- a/codegen/masm/tests/test_divisor.rs +++ b/codegen/masm/tests/test_divisor.rs @@ -4,7 +4,7 @@ use miden_processor::{ math::{Felt, FieldElement}, AdviceInputs, Kernel, MemAdviceProvider, Process, QuadExtension, StackInputs, }; -use winter_prover::{Assertion, ConstraintDivisor}; +use winter_air::{Assertion, ConstraintDivisor}; mod utils; use utils::{codegen, test_code, to_stack_order, Data}; diff --git a/codegen/winterfell/Cargo.toml b/codegen/winterfell/Cargo.toml index 5bf5a3c2..0d1f8fc9 100644 --- a/codegen/winterfell/Cargo.toml +++ b/codegen/winterfell/Cargo.toml @@ -1,17 +1,17 @@ [package] name = "air-codegen-winter" -version = "0.2.0" -description="Winterfell code generator for the AirScript language" +version = "0.3.0" +description = "Winterfell code generator for the AirScript language" authors = ["miden contributors"] -readme="README.md" +readme = "README.md" license = "MIT" repository = "https://github.com/0xPolygonMiden/air-script" categories = ["compilers", "cryptography"] keywords = ["air", "stark", "winterfell", "zero-knowledge", "zkp"] edition = "2021" -rust-version = "1.65" +rust-version = "1.67" [dependencies] -air-ir = { path="../../ir", version="0.2.0" } +air-ir = { package = "air-ir", path = "../../ir", version = "0.3" } anyhow = "1.0" -codegen = "0.2.0" +codegen = "0.2" diff --git a/ir/Cargo.toml b/ir/Cargo.toml index f340d276..c20227ac 100644 --- a/ir/Cargo.toml +++ b/ir/Cargo.toml @@ -1,19 +1,19 @@ [package] name = "air-ir" -version = "0.2.0" -description="Intermediate representation for the AirScript language" +version = "0.3.0" +description = "Intermediate representation for the AirScript language" authors = ["miden contributors"] -readme="README.md" +readme = "README.md" license = "MIT" repository = "https://github.com/0xPolygonMiden/air-script" categories = ["compilers", "cryptography"] keywords = ["air", "stark", "zero-knowledge", "zkp"] edition = "2021" -rust-version = "1.65" +rust-version = "1.67" [dependencies] -air-parser = { path = "../parser", version = "0.2.0" } -air-pass = { path = "../pass", version = "0.1.0" } +air-parser = { package = "air-parser", path = "../parser", version = "0.3" } +air-pass = { package = "air-pass", path = "../pass", version = "0.1" } anyhow = "1.0" -miden-diagnostics = { git = "https://github.com/0xpolygonmiden/miden-diagnostics" } +miden-diagnostics = "0.1" thiserror = "1.0" diff --git a/ir/src/passes/translate.rs b/ir/src/passes/translate.rs index 96533b58..694c9694 100644 --- a/ir/src/passes/translate.rs +++ b/ir/src/passes/translate.rs @@ -293,9 +293,13 @@ impl<'a> AirBuilder<'a> { // The left-hand side of a boundary constraint equality expression is always a bounded symbol access // against a trace column. It is fine to panic here if that is ever violated. let ast::ScalarExpr::BoundedSymbolAccess(ref access) = lhs else { - self.diagnostics.diagnostic(Severity::Bug) + self.diagnostics + .diagnostic(Severity::Bug) .with_message("invalid boundary constraint") - .with_primary_label(lhs_span, "expected bounded trace column access here, e.g. 'main[0].first'") + .with_primary_label( + lhs_span, + "expected bounded trace column access here, e.g. 'main[0].first'", + ) .emit(); return Err(CompileError::Failed); }; @@ -415,7 +419,9 @@ impl<'a> AirBuilder<'a> { fn insert_binary_expr(&mut self, expr: &ast::BinaryExpr) -> NodeIndex { if expr.op == ast::BinaryOp::Exp { let lhs = self.insert_scalar_expr(expr.lhs.as_ref()); - let ast::ScalarExpr::Const(rhs) = expr.rhs.as_ref() else { unreachable!(); }; + let ast::ScalarExpr::Const(rhs) = expr.rhs.as_ref() else { + unreachable!(); + }; return self.insert_op(Operation::Exp(lhs, rhs.item as usize)); } diff --git a/parser/Cargo.toml b/parser/Cargo.toml index 3d3805a1..f970eb8b 100644 --- a/parser/Cargo.toml +++ b/parser/Cargo.toml @@ -1,24 +1,24 @@ [package] name = "air-parser" -version = "0.2.0" -description="Parser for the AirScript language" +version = "0.3.0" +description = "Parser for the AirScript language" authors = ["miden contributors"] -readme="README.md" +readme = "README.md" license = "MIT" repository = "https://github.com/0xPolygonMiden/air-script" categories = ["compilers", "cryptography", "parser-implementations"] keywords = ["air", "stark", "zero-knowledge", "zkp"] edition = "2021" -rust-version = "1.65" +rust-version = "1.67" [build-dependencies] -lalrpop = { version = "0.20.0", default-features = false } +lalrpop = { version = "0.20", default-features = false } [dependencies] -air-pass = { path = "../pass", version = "0.1.0" } -miden-diagnostics = { git = "https://github.com/0xPolygonMiden/miden-diagnostics" } -miden-parsing = { git = "https://github.com/0xPolygonMiden/miden-parsing" } -lalrpop-util = { version = "0.20.0" } +air-pass = { package = "air-pass", path = "../pass", version = "0.1" } +miden-diagnostics = "0.1" +miden-parsing = "0.1" +lalrpop-util="0.20" lazy_static = "1.4" petgraph = "0.6" regex = "1" diff --git a/parser/src/transforms/inlining.rs b/parser/src/transforms/inlining.rs index 51483642..25e0f4ae 100644 --- a/parser/src/transforms/inlining.rs +++ b/parser/src/transforms/inlining.rs @@ -638,7 +638,9 @@ impl<'a> Inlining<'a> { let mut statements = vec![]; // Get the number of iterations in this comprehension - let Type::Vector(num_iterations) = expr.ty.unwrap() else { panic!("invalid comprehension type"); }; + let Type::Vector(num_iterations) = expr.ty.unwrap() else { + panic!("invalid comprehension type"); + }; // Step the iterables for each iteration, giving each it's own lexical scope for i in 0..num_iterations { @@ -1068,7 +1070,9 @@ impl<'a> Inlining<'a> { // The input expression must have been a symbol access, as matrices of columns // aren't a thing, and there is no other expression type which can produce trace // bindings. - let Expr::SymbolAccess(ref access) = input else { panic!("unexpected element in trace column vector: {:#?}", input) }; + let Expr::SymbolAccess(ref access) = input else { + panic!("unexpected element in trace column vector: {:#?}", input) + }; // Unless we have leftover input, initialize `binding_ty` with the binding type of this input let bt = binding_ty .take() diff --git a/pass/Cargo.toml b/pass/Cargo.toml index 2278c336..a4ed61de 100644 --- a/pass/Cargo.toml +++ b/pass/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "air-pass" version = "0.1.0" -description="Provides reusable compiler pass infrastructure for the AirScript compiler" +description = "Reusable compiler pass infrastructure for the AirScript compiler" authors = ["Paul Schoenfelder"] license = "MIT" repository = "https://github.com/0xPolygonMiden/air-script" categories = ["compilers"] edition = "2021" -rust-version = "1.65" +rust-version = "1.67" [dependencies]