rf_core/lang/
execution.rs1use crate::vm::round_vm::RoundVM;
2use std::str::FromStr;
3
4pub fn round<A: Clone + 'static + FromStr>(
5 vm: &mut RoundVM,
6 program: impl Fn(&mut RoundVM) -> A,
7) -> A {
8 let res = program(vm);
9 vm.register_root(res);
10 vm.export_data().root::<A>()
11}