dslcompile 0.0.1

High-performance symbolic mathematics with final tagless design, egglog optimization, and Rust hot-loading compilation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use dslcompile_macros::optimize_compile_time;

#[test]
fn test_safe_egglog_works() {
    let x = 2.0;

    // Test that the macro compiles and runs without infinite expansion
    let result = optimize_compile_time!(var::<0>().add(constant(0.0)), [x]);

    // Should optimize x + 0 to x
    assert_eq!(result, x);
    println!("✅ Safe egglog macro works! x + 0 = {result}");
}