hara-native 0.1.13

HAL-free native host runtime and package launcher for Hara
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
import { start } from "./packages/browser/dist/hara-wasm-full/hara.mjs";

const source = document.querySelector("#source");
const result = document.querySelector("#result");
const button = document.querySelector("#run");

const hara = await start();
result.textContent = "Hara browser / full runtime\nready";
button.addEventListener("click", () => {
  try { result.textContent = hara.eval(source.value); }
  catch (error) { result.textContent = `error: ${error}`; }
});