Currently, users need to write steel.
Ideally, users could write Rust and not have to think about steel if they don't want to for new nodes.
Function arguments will likely require TryFrom<SteelVal> and return types will require Into<SteelVal>.
Rough Example
fn expr(&self, ctx: ExprCtx<Env>) -> Result<ExprKind> {
gantz_core::expr_from_rust_fn(my_fust_fn)
}
fn my_rust_fn(a: i32, b: i32) -> i32 {
// ...
}
Open Qs
- How to handle state? Dedicated fn that provides
state: &mut T as final arg?
- How to handle branching? Dedicated fn that returns a type implementing
Branch? Maybe branch id derivable for enums, each variant associated with a branch index, and variant value Into<SteelVal>?