[oden] Start messing with the script

This commit is contained in:
John Doty 2023-06-19 08:31:13 -07:00
parent 9f808cea31
commit 156b6d6691
4 changed files with 206 additions and 54 deletions

22
src/script.rs Normal file
View file

@ -0,0 +1,22 @@
use oden_js as js;
pub struct ScriptContext {
_context: js::Context,
}
impl ScriptContext {
pub fn new() -> Self {
let runtime = js::Runtime::new();
let mut context = js::Context::new(runtime);
context.add_intrinsic_bigfloat();
context.add_intrinsic_bigdecimal();
context.add_intrinsic_operators();
ScriptContext { _context: context }
}
pub fn update(&self) {}
pub fn render(&self) {}
}