Hao runs JavaScript and TypeScript inside native applications. It can also run a
script from the command line. Applications can add their own modules alongside
Hao's built-in std: modules for files, HTTP, processes, tests, and more.
Hao currently builds on macOS arm64. The build downloads and compiles its pinned Cyna compiler. Install Zig 0.17.0, Git, Python 3, curl, and a C compiler first.
git clone https://github.com/neucine/hao.git
cd hao
sh build.sh
./build/hao-cyna --versionCreate hello.ts:
console.log("Hello from Hao");Run it:
./build/hao-cyna hello.tsTo use Hao inside a native application, start with embedding Hao.
Hao also loads compatible ES modules from node_modules. See the
release guide if you maintain the runtime.
