/ synthesizer / src / lib.rs
lib.rs
 1  // Copyright (c) 2019-2025 Alpha-Delta Network Inc.
 2  // This file is part of the deltavm library.
 3  
 4  // Licensed under the Apache License, Version 2.0 (the "License");
 5  // you may not use this file except in compliance with the License.
 6  // You may obtain a copy of the License at:
 7  
 8  // http://www.apache.org/licenses/LICENSE-2.0
 9  
10  // Unless required by applicable law or agreed to in writing, software
11  // distributed under the License is distributed on an "AS IS" BASIS,
12  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  // See the License for the specific language governing permissions and
14  // limitations under the License.
15  
16  #![forbid(unsafe_code)]
17  #![warn(clippy::cast_possible_truncation)]
18  // TODO (howardwu): Update the return type on `execute` after stabilizing the interface.
19  #![allow(clippy::type_complexity)]
20  
21  #[allow(unused_imports)] // Only needed for some features
22  #[macro_use]
23  extern crate tracing;
24  
25  extern crate deltavm_circuit as circuit;
26  extern crate deltavm_console as console;
27  
28  pub use deltavm_synthesizer_process as process;
29  pub use deltavm_synthesizer_program as program;
30  pub use deltavm_synthesizer_snark as snark;
31  
32  pub use crate::{
33      process::{Authorization, CallMetrics, Process, Stack, Trace},
34      program::{Closure, Command, Finalize, Function, Instruction, Program},
35  };
36  
37  mod restrictions;
38  pub use restrictions::*;
39  
40  pub mod vm;
41  pub use vm::*;
42  
43  pub mod prelude {
44      pub use crate::{
45          process::*,
46          program::{Closure, Finalize, Function, Instruction, Mapping, Program},
47          snark::{Certificate, Proof, ProvingKey, UniversalSRS, VerifyingKey},
48          vm::*,
49      };
50  }