Roadmap 0.13, Python scripting

PY.4 Python works offline in CadCraft Studio and in Save for offline

  • Feature
  • Built · in the lab
  • CadCraft
  • BimCraft
  • ModelCraft
  • PartCraft

a Discord member Suggested. The Python runtime is fetched the first time a script runs and is not part of Save for offline yet; whether packed Studio carries it is not verified. Make the add-on carry its runtime offline, and say in the panel when it is not available.

2026-12-03 (python-13, PY.4), partly built in the lab (add-on python 0.2.0). The runtime is the one CPython for WASI the apps already use (assets/vendor/cpython-wasi, never a second copy; about 7 MB over the network, 12.5 MB kept). Built and run in the real page: the panel says whether Python is on the device; Keep Python on this device stores the two files in Cache Storage (cc-addon-python:v1, with progress); the runner reads that copy first, so a run works with the network to the runtime files blocked (browser-py-13.mjs, offline row), and with nothing kept and no network the console says so in plain words and names the button; Forget removes it. With the add-on on, the app's Save for offline is told about the two files through window.ccOfflineExtra (the hook MarkupCraft already uses; another add-on's list is kept). The runtime is loaded when the console first runs a script, never at start: settled start of the lab CadCraft with the add-on on or off, median of 5, 3514 ms on and 3617 ms off, no request for python.wasm or the standard library in any run (docs/results/0.13/py-start.json). Tests: tools/python-test/scripts.mjs 43/0, offline.mjs 22/0 (real CPython), test_package.py 42/0, lab browser run tools/python-test/browser-py-13.mjs 94/0 (CadCraft, PartCraft, BimCraft, ModelCraft, MarkupCraft, TakeoffCraft, CivilCraft, DetailCraft). Log docs/0.13-sessions/python-13.md. NOT proven: (1) a packed CadCraft Studio carries assets/vendor/cpython-wasi: the packers follow every /assets/vendor/<lib>/ a build's code names and main.js names it, but no Studio was built (rule 79); (2) a real Save for offline round trip with the service worker (the lab test blocks it): the URLs are given, the copy was not opened offline; (3) the engine needs stack switching (current Chrome and Edge), so packed Studio on macOS and iPad must be checked.

closing 2026-12-05: Partly built -> Built. Built in the lab (offline.mjs 22/0, browser-py-13 94/0, python-13.md); left are two checks on a build (rule 76).

Waits on: 0.13 Studio build: studio-check-sheet.md line 7 (packed runtime, Save for offline)

From: a Discord member

Add a comment

Community comments

No comments yet

Add detail as we go: how you would use it, files or steps that show the problem, what other programs do. The team reads every comment.

Sign in or create a free account to add a comment.