tricu

An interpreted language for exploring Tree Calculus
Log | Files | Refs | README | LICENSE

runtime-session.js (474B)


      1 import { HaskellSession } from './haskell-session.js';
      2 export async function createRuntimeSession(name, compiler) {
      3     if (name === 'zig-wasm') {
      4         const module = await import(new URL('../runtime/zig/site-session.mjs', import.meta.url).href);
      5         return module.create({ base: new URL('../', import.meta.url), compiler });
      6     }
      7     if (name !== 'haskell-wasm')
      8         throw new Error('Unsupported runtime backend');
      9     return HaskellSession.create(compiler);
     10 }