#![cfg_attr(not(test), no_std)] #![feature(allocator_api)] #![feature(vec_push_within_capacity)] #![feature(trusted_len)] #![feature(assert_matches)] #![feature(stmt_expr_attributes)] //! A highly portable computer algebra system library implemented in Rust. extern crate alloc; pub mod egraph; pub mod expressions; pub mod id; pub mod numerics; pub mod utilities; /// Asserts a condition at compile time. #[macro_export] macro_rules! static_assert { ($cond:expr $(,)?) => { const _: () = { if !$cond { panic!(concat!( "static assertion failed: ", stringify!($cond), )); } }; }; ($cond:expr, $msg:literal $(,)?) => { const _: () = { if !$cond { panic!($msg); } }; }; } /// Asserts equality at compile time. #[macro_export] macro_rules! static_assert_eq { ($a:expr, $b:expr $(,)?) => { const _: () = { if $a != $b { panic!(concat!( "static assertion failed: ", stringify!($a), " == ", stringify!($b), )); } }; }; ($a:expr, $b:expr, $msg:literal $(,)?) => { const _: () = { if $a != $b { panic!(concat!( "static assertion failed: ", stringify!($a), " == ", stringify!($b), ": ", $msg, )); } }; }; }