feat: add boa
This commit is contained in:
14
__lang/boa/src/main.rs
Normal file
14
__lang/boa/src/main.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use boa::Context;
|
||||
|
||||
fn main() {
|
||||
let mut context = Context::new();
|
||||
let script = r##"
|
||||
function helloworld() {
|
||||
console.log('hello world');
|
||||
}
|
||||
helloworld();
|
||||
"hello world!!!"
|
||||
"##;
|
||||
let v = context.eval(script).expect("Eval failed!");
|
||||
println!("{:?}", v);
|
||||
}
|
||||
Reference in New Issue
Block a user