1mod compressed;
7mod fst;
8mod ghw;
9mod hierarchy;
10mod signals;
11pub mod simple;
12mod vcd;
13pub mod viewers;
14mod wavemem;
15
16pub const VERSION: &str = env!("CARGO_PKG_VERSION");
18
19#[derive(Debug, PartialEq, Copy, Clone)]
20#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
21pub enum FileFormat {
22 Vcd,
23 Fst,
24 Ghw,
25 Unknown,
26}
27#[derive(Debug, Copy, Clone)]
28pub struct LoadOptions {
29 pub multi_thread: bool,
31 pub remove_scopes_with_empty_name: bool,
33}
34
35impl Default for LoadOptions {
36 fn default() -> Self {
37 Self {
38 multi_thread: true,
39 remove_scopes_with_empty_name: false,
40 }
41 }
42}
43
44pub type TimeTable = Vec<Time>;
45
46#[derive(Debug, thiserror::Error)]
47pub enum WellenError {
48 #[error("failed to load {0:?}:\n{1}")]
49 FailedToLoad(FileFormat, String),
50 #[error("unknown file format, only GHW, FST and VCD are supported")]
51 UnknownFileFormat,
52 #[error("io error")]
53 Io(#[from] std::io::Error),
54}
55
56pub type Result<T> = std::result::Result<T, WellenError>;
57
58pub use compressed::{CompressedSignal, CompressedTimeTable, Compression};
59pub use hierarchy::{
60 Hierarchy, Scope, ScopeOrVar, ScopeOrVarRef, ScopeRef, ScopeType, SignalEncoding, SignalRef,
61 Timescale, TimescaleUnit, Var, VarDirection, VarIndex, VarRef, VarType,
62};
63pub use signals::{Real, Signal, SignalSource, SignalValue, Time, TimeTableIdx};
64
65#[cfg(feature = "benchmark")]
66pub use wavemem::check_states_pub;