pipa-js 0.1.1

A fast, minimal ES2023 JavaScript runtime built in Rust.
Documentation
1
2
3
4
5
6
7
8
9
use pipa::{JSRuntime, eval};
fn main() {
    let mut rt = JSRuntime::new();
    let mut ctx = rt.new_context();
    match eval(&mut ctx, "console.log('hello from console');") {
        Ok(_) => println!("OK"),
        Err(e) => println!("ERR: {}", e),
    }
}