Skip to content

Latest commit

 

History

History
72 lines (56 loc) · 2.02 KB

README.md

File metadata and controls

72 lines (56 loc) · 2.02 KB

Pan logo

Pan

Son of the Hermes

Yet another JavaScript runtime powered by Hermes. Pan is built to support positron

asciicast

Motivation

Just for Fun! ...but, I was inspired by the following reasons:

electron is a great framework, but app's backend code is written in JS so you can check it easily. tauri is also a great framework, but it was a pity that app's backend couldn't be written in JS.

I was drawn to the hermes engine's features to compile JS to bytecode and run it independently. Pan aims to support an electron-like framework using this to make the backend code more difficult to understand.

Status

  • Extremely unstable
  • Support execute js/hbc files
  • Support the require function

Goals

  • Compatibility with Node.js
  • Support .hbc files import and export
  • Support Node.js core modules
  • Support Node API (N-API)
  • Support CommonJS with Node Module Resolution

Non-Goals

  • Node addons without using Node API (N-API)
  • Better module system (or better module resolution)
  • ESM modules (for now)
  • Cross platform (for now)
  • Libuv

Note

  • This is a POC framework.
  • It only works on macOS.

Development

Pre-requirements

macOS

Install rust.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Install dependencies for Hermes engine build.

brew install cmake git ninja

Clone project and submodules

git clone https://github.com/hahnlee/pan.git
cd pan
git submodule update --init --recursive

Build and run

cd crates/cli
cargo run -v

LICENSE