import { randomFillSync } from "randomfill";
import path from "path-browserify";
import hrtime from "./browser-hrtime";
import { WASIBindings, WASIExitError, WASIKillError } from "../types";
const bindings: WASIBindings = {
hrtime: hrtime.bigint,
exit: (code: number | null) => {
throw new WASIExitError(code);
},
kill: (signal: string) => {
throw new WASIKillError(signal);
},
randomFillSync,
isTTY: () => true,
path,
fs: null,
};
export default bindings;