2 releases

Uses new Rust 2024

0.4.1 Sep 8, 2025
0.4.0 Sep 7, 2025

#936 in Programming languages

26 downloads per month
Used in fidget

MPL-2.0 license

715KB
16K SLoC

Compilation down to native machine code

Users are unlikely to use anything in this module other than JitFunction, which is a Function that uses JIT evaluation.

use fidget_core::{
    context::Tree,
    shape::EzShape,
};
use fidget_jit::JitShape;

let tree = Tree::x() + Tree::y();
let shape = JitShape::from(tree);

// Generate machine code to execute the tape
let tape = shape.ez_point_tape();
let mut eval = JitShape::new_point_eval();

// This calls directly into that machine code!
let (r, _trace) = eval.eval(&tape, 0.1, 0.3, 0.0)?;
assert_eq!(r, 0.1 + 0.3);

fidget-jit implements native JIT compilation of math expressions.

It is typically used through the fidget crate, which imports it under the jit namespace

» Crate » Docs » CI » MPL-2.0

Dependencies

~7–37MB
~625K SLoC