/ concept-collection / numbl-web-ide
Sign in
concept-collection / numbl-web-ide
numbl-web-ide / README.md
64 lines · 3.0 KBPreviewCodeBlameHistoryRaw
1# numbl web IDE
3Run MATLAB-syntax `.m` files in your browser with
4[numbl](https://numbl.org), inside a VS Code-style IDE built on
5[minwebide](https://github.com/magland/minwebide). Projects live in your
6browser's IndexedDB.
8**Live site:** https://concept-collection.github.io/numbl-web-ide/
10The landing page manages **projects** (create / rename / duplicate / delete),
11each with its own file system, addressed as `#/project/<id>`. Create a
12**sample project** and press **▶** on a script:
14- Text output streams to the **Output** panel; figures open as **Figure N**
15 views in the secondary side bar (rendered by numbl's own figure renderer —
16 2-D canvas, 3-D three.js).
17- The whole project is the workspace, numbl.org-style: functions next to the
18 running script resolve automatically, other folders via `addpath`.
19- Runs use the current editor contents (saved or not), execute in a Web
20 Worker, and can be stopped with **⏹**.
21- Files a script writes (`fopen`/`fprintf`) appear in the Explorer.
22- Scripts can install packages from the [mip](https://mip.sh) registry:
23 `mip load --install inpoly` (see `scripts/mip_demo.m` in the sample).
24- The project name in the status bar takes you back to the project list.
26## mip packages
28The mip package manager and installed packages live in a **system store**
29a dedicated IndexedDB database shared by all projects — and never appear in
30a project's Explorer (unlike numbl.org, which shows them under a `system/`
31prefix). The mip core tooling is fetched in the background when the IDE
32opens; every run merges the system files into the interpreter's virtual file
33system and puts the mip directory on the search path, so `mip load`,
34`mip install`, `mip list`, etc. work as in the numbl CLI/IDE. Packages a
35script installs are written back to the system store after the run, so
36they're reused across runs, reloads, and projects. After **30 minutes of
37inactivity** the store is wiped and mip core is re-fetched on next use
38(keeping the mutable `mip-numbl` release fresh); installed packages
39re-install on demand via `mip load --install`.
41## Development
43minwebide is consumed as a sibling checkout (`file:../minwebide`):
45```sh
46git clone https://github.com/magland/minwebide ../minwebide
47(cd ../minwebide && npm install) # fetches the pinned VS Code source
48npm install
49npm run dev
50```
52- `npm run build` — static bundle in `dist/`
53- `npm run typecheck` — typechecks app code (vendor diagnostics suppressed)
54- `npm run smoke` — headless end-to-end test against the built bundle
55- `bash scripts/generate-builtins.sh` — refresh the syntax-highlighting
56 builtin list after upgrading the `numbl` dependency
58Cross-origin isolation: dev/preview servers send COOP/COEP headers so
59`SharedArrayBuffer` is available (numbl uses it for `pause()` timing). The
60deployed site gets the same via `coi-serviceworker.js`, injected into
61`index.html` only at build time — dev never registers a service worker.
63CI checks out `magland/minwebide` next to this repo, installs both, builds,
64and publishes `dist/` to GitHub Pages.
moveopenescclose