Installation
Requirements
Runtime
- Node.js: ≥ 18 (required for
tasksmodule and CLI/benchmarks) - Browser: Modern browsers with ES2020+ support
Development
- TypeScript: ≥ 5.0
Install
$ npm install symbion
Browser vs Node.js Usage
Symbion is designed to run in both modern browsers and Node.js environments:
- Browser: use Symbion for models/visual demos/interactive education without proprietary toolchains.
- Node.js: use the full stack including
tasksbenchmarks, file-based logging, and CLI workflows.
Important: the tasks module is Node-only (file I/O + CLI scripts). Use the browser entry point for web apps.
Recommended (bundlers with conditional exports)
Modern bundlers (Webpack, Vite, esbuild, etc.) automatically select the correct entry point based on your build target:
// Same import statement works in both environments: // - Browser builds → resolves to dist/browser.mjs (excludes Node-only 'tasks') // - Node.js builds → resolves to dist/node.mjs (full functionality) import { channel, planning, isac } from 'symbion';
Explicit entry points (when you want to force the runtime)
// Force browser-only bundle (excludes 'tasks' module) import { channel, planning, isac } from 'symbion/browser'; // Force Node.js bundle (includes all features) import { channel, planning, tasks } from 'symbion/node';