Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tamaroning/jsjit
https://github.com/tamaroning/jsjit
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tamaroning/jsjit
- Owner: tamaroning
- Created: 2024-01-01T15:56:26.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-01-01T15:56:28.000Z (about 1 year ago)
- Last Synced: 2024-04-18T02:12:59.756Z (9 months ago)
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```