@zhuolinho/babel-preset-abc

0.3.13 • Public • Published

node-qjsc

Node.js addon for the QuickJS compiler.

Current supported version:

  • 20210327

Install

npm install qjsc --save

Usage

const Qjsc = require('qjsc');
const qjsc = new Qjsc();

// Dump bytecode from javascript source;
qjsc.compile('function hello() { return 1 + 1};'); // <Buffer ...>

// Use specified quickjs version
qjsc = new Qjsc({version: '20210327'});

// Get all supported versions.
qjsc.getSupportedVersions();

Contribute

Generate compile_commands.json

node-gyp configure -- -f gyp.generator.compile_commands_json.py

Prebuild linux binary

  1. Install docker
  2. Build local image with Dockerfile
docker build -t qjsc .
  1. Enter into images
docker run --rm -it -v $(pwd):/project qjsc
  1. Set up env in docker container
cd project
scl enable rh-nodejs12 bash
scl enable devtoolset-7 bash
  1. Build your binary
npm install
npm run prebuild

Readme

Keywords

none

Package Sidebar

Install

npm i @zhuolinho/babel-preset-abc

Weekly Downloads

0

Version

0.3.13

License

Apache License 2.0

Unpacked Size

27.7 MB

Total Files

442

Last publish

Collaborators

  • zhuolinho