Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JSI is a JavaScript interpreter written in Rust that supports bytecode similar to quickjs.

NotificationsYou must be signed in to change notification settings

echosoar/jsi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSI is a JavaScript interpreter written in Rust that supports bytecode similar to quickjs.

test262 passed

test262 total


Usage

use jsi::JSI;letmut jsi =JSI::new();// Run with astlet result = jsi.run(String::from("\  let a = [];  let i = 0;  outer:  while(i < 3) {    i ++;    let j = 0;    while(j < 5) {      j ++;      if (j == 1 && i == 1) {        continue outer      }      if (j == 4) break      if (j == 3 && i == 2) {        break outer      }      a.push(i * j);    }  }  a.join(':')")).unwrap();assert_eq!(result,Value::String(String::from("2:4")));// Run with bytecodelet result2 = jsi.run_with_bytecode(String::from("\  let a = '123';  let b = 'abc';  a + b  ")).unwrap();assert_eq!(result,Value::String(String::from("123abc")));

Development

  • git submodulegit submodule update --init --recursive
  • test262RUST_MIN_STACK=8388608 cargo test --package jsi --test test262_test -- test_all_262 --exact --nocapture

Refs

License

MIT


byechosoar

About

JSI is a JavaScript interpreter written in Rust that supports bytecode similar to quickjs.

Topics

Resources

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp