Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tamaroning/jsjit


https://github.com/tamaroning/jsjit

Last synced: 19 days ago
JSON representation

Awesome Lists containing this project

README

        

# jsjit

Experimental javascript JIT compiler

# Prerequisites

- v8 or d8

1. Get the v8 or d8 executable
- See https://v8.dev/docs/build
2. Set the path to v8/d8 to the environment variable `$JSJIT_D8_BIN`
- Make sure `$JSJIT_D8_BIN` points to the executable
- e.g. Write `export JSJIT_D8_BIN=$HOME/path/to/v8/v8/out/x64.debug/d8` in `.bashrc`

# Run

At first, you have to compile js code to v8 bytecode:

```sh
./v8-bytecode-gen.py exmaples/add.js
```

Then, feed the generated bytecode to our interpreter:

```sh
cargo run examples/add.bc.json
```