darkfi/zkas/mod.rs
1/* This file is part of DarkFi (https://dark.fi)
2 *
3 * Copyright (C) 2020-2026 Dyne.org foundation
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Affero General Public License as
7 * published by the Free Software Foundation, either version 3 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Affero General Public License for more details.
14 *
15 * You should have received a copy of the GNU Affero General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
19//! `src/zkas` is the library holding the zkas toolchain, consisting of a
20//! lexer, parser, static/semantic analyzers, a binary compiler, and a
21//! binary decoder.
22
23/// Error emitter
24mod error;
25
26/// Constants
27pub mod constants;
28
29/// Language opcodes
30pub mod opcode;
31pub use opcode::Opcode;
32
33/// Language types
34pub mod types;
35pub use types::{LitType, VarType};
36
37/// Language AST
38pub mod ast;
39
40/// Lexer module
41pub mod lexer;
42pub use lexer::Lexer;
43
44/// Parser module
45pub mod parser;
46pub use parser::Parser;
47
48/// Analyzer module
49pub mod analyzer;
50pub use analyzer::Analyzer;
51
52/// Compiler module
53pub mod compiler;
54pub use compiler::Compiler;
55
56/// Decoder module
57pub mod decoder;
58pub use decoder::ZkBinary;