[oden] Start messing with the script
This commit is contained in:
parent
9f808cea31
commit
156b6d6691
4 changed files with 206 additions and 54 deletions
22
src/script.rs
Normal file
22
src/script.rs
Normal 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) {}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue