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))]
10pub mod builder;
11pub mod core;
12#[cfg(feature = "model_unstable")]
13pub mod export;
14pub mod extension;
15pub mod hugr;
16#[cfg(feature = "model_unstable")]
17pub mod import;
18pub mod macros;
19pub mod ops;
20pub mod package;
21pub mod std_extensions;
22pub mod types;
23pub mod utils;
24
25pub use crate::core::{
26    CircuitUnit, Direction, IncomingPort, Node, NodeIndex, OutgoingPort, Port, PortIndex, Wire,
27};
28pub use crate::extension::Extension;
29pub use crate::hugr::{Hugr, HugrView, SimpleReplacement};
30
31#[cfg(test)]
32pub mod proptest;