quickjs-compile 0.11.0

Bytecode compiler for the pure-Rust QuickJS port
Documentation
1
2
3
4
5
6
7
8
9
use js_compile::{compile_script, disassemble};
use js_parse::parse_script;

fn main() {
    let src = std::fs::read_to_string(std::env::args().nth(1).unwrap()).unwrap();
    let program = parse_script(&src).unwrap();
    let function = compile_script(&program).unwrap();
    print!("{}", disassemble(&function));
}