hugr_core/
lib.rs

1//! Extensible, graph-based program representation with first-class support for linear types.
2//!
3//! This crate contains the core definitions for the HUGR representation.
4//! See the [top-level crate documentation](https://docs.rs/hugr/latest/hugr/) for more information.
5
6// proptest-derive generates many of these warnings.
7// https://github.com/rust-lang/rust/issues/120363
8// https://github.com/proptest-rs/proptest/issues/447
9#![cfg_attr(test, allow(non_local_definitions))]
10#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
11
12pub mod builder;
13pub mod core;
14pub mod envelope;
15#[cfg(feature = "model_unstable")]
16pub mod export;
17pub mod extension;
18pub mod hugr;
19#[cfg(feature = "model_unstable")]
20pub mod import;
21pub mod macros;
22pub mod ops;
23pub mod package;
24pub mod std_extensions;
25pub mod types;
26pub mod utils;
27
28pub use crate::core::{
29    CircuitUnit, Direction, IncomingPort, Node, NodeIndex, OutgoingPort, Port, PortIndex, Wire,
30};
31pub use crate::extension::Extension;
32pub use crate::hugr::{Hugr, HugrView, SimpleReplacement};
33
34#[cfg(test)]
35pub mod proptest;