Expand description
Extensible, graph-based program representation with first-class support for linear types.
This crate contains the core definitions for the HUGR representation. See the top-level crate documentation for more information.
Re-exports§
- pub use crate::core::CircuitUnit;
- pub use crate::core::Direction;
- pub use crate::core::IncomingPort;
- pub use crate::core::Node;
- pub use crate::core::NodeIndex;
- pub use crate::core::OutgoingPort;
- pub use crate::core::Port;
- pub use crate::core::PortIndex;
- pub use crate::core::Visibility;
- pub use crate::core::Wire;
- pub use crate::extension::Extension;
- pub use crate::hugr::Hugr;
- pub use crate::hugr::HugrView;
- pub use crate::hugr::SimpleReplacement;
Modules§
- builder
- Utilities for building valid HUGRs.
- core
- Definitions for the core types used in the Hugr.
- envelope
- Envelope format for HUGR packages.
- export
- Exporting HUGR graphs to their hugr-modelrepresentation.
- extension
- Extensions
- hugr
- The Hugr data structure, and its basic component handles.
- import
- Importing HUGR graphs from their hugr-modelrepresentation.
- macros
- Helper macros.
- ops
- The operation types for the HUGR.
- package
- Bundles of hugr modules along with the extension required to load them.
- std_extensions 
- Experiments for Extensiondefinitions.
- types
- General wire types used in the compiler
- utils
- General utilities.
Macros§
- const_extension_ ids 
- Declare ‘const’ variables holding new ExtensionIds, validating that they are well-formed as separate tests - hence, usable at the top level of a test module only. Example:
- impl_serde_ as_ binary_ envelope 
- Implements serde_with::DeserializeAsandserde_with::SerializeAsfor the helper to deserializeHugrandPackagetypes, using the given extension registry.
- impl_serde_ as_ string_ envelope 
- Implements serde_with::DeserializeAsandserde_with::SerializeAsfor the helper to deserializeHugrandPackagetypes, using the given extension registry.
- type_row 
- Creates a TypeRowbacked by statically defined data, avoiding allocations.