hugr_core/
std_extensions.rs1use crate::extension::ExtensionRegistry;
6
7pub mod arithmetic;
8pub mod collections;
9pub mod logic;
10pub mod ptr;
11
12pub fn std_reg() -> ExtensionRegistry {
14 let reg = ExtensionRegistry::new([
15 crate::extension::prelude::PRELUDE.clone(),
16 arithmetic::int_ops::EXTENSION.to_owned(),
17 arithmetic::int_types::EXTENSION.to_owned(),
18 arithmetic::conversions::EXTENSION.to_owned(),
19 arithmetic::float_ops::EXTENSION.to_owned(),
20 arithmetic::float_types::EXTENSION.to_owned(),
21 collections::array::EXTENSION.to_owned(),
22 collections::list::EXTENSION.to_owned(),
23 collections::static_array::EXTENSION.to_owned(),
24 collections::value_array::EXTENSION.to_owned(),
25 logic::EXTENSION.to_owned(),
26 ptr::EXTENSION.to_owned(),
27 ]);
28 reg.validate()
29 .expect("Standard extension registry is valid");
30 reg
31}
32
33lazy_static::lazy_static! {
34 pub static ref STD_REG: ExtensionRegistry = std_reg();
36}