BioScript DNA Compiler & Runtime for VS Code
First-class editing and execution support for the BioScript nucleotide DSL.
Features
.bio file detection and BioScript syntax highlighting
# comment toggling and region folding
- snippets for complete programs and every instruction
- instruction and base-4 register IntelliSense
- hover documentation with opcode, ATP cost, and operand decoding
- live diagnostics for source size, strict-mode characters, incomplete codons,
missing operands, and executable junk codons
- editor CodeLens, title-bar, context-menu, and Command Palette actions
- safe Compile and Run commands using a direct Python process rather than a shell
- runtime output, execution status, and a Stop command
- automatic workspace
.venv Python discovery on Windows, macOS, and Linux
Quick start
- Install the BioScript Python package in your project environment.
- Open a folder containing
.bio files.
- Open a
.bio file and choose Run BioScript from the editor title bar, or
run BioScript: Run Current File from the Command Palette.
The extension first checks the workspace's .venv:
- Windows:
.venv\Scripts\python.exe
- macOS/Linux:
.venv/bin/python3, then .venv/bin/python
If no workspace environment is present, it uses python. Set
bioscript.runtime.pythonPath when your interpreter lives elsewhere.
Language
| Codon |
Opcode |
ATP |
Description |
AUG |
STRT |
0 |
Allocate a frame and start |
UAA |
HALT |
0 |
Halt the current strand |
CTC |
MTBL |
2 |
Metabolize a bytes packet |
GAG r |
REPL |
5 |
Replicate register r |
CAC r |
IMMU |
3 |
Verify and repair register r |
GGC r |
EXPR |
1 |
Decode and output register r |
| other |
JUNK |
1 |
Warn and advance |
Register operands are base-4 codons: A=0, C=1, G=2, and T/U=3.
Therefore AAA is register 0, AAC is register 1, and TTT is register 63.
Commands
- BioScript: Compile Current File
- BioScript: Run Current File
- BioScript: Stop Active Program
- BioScript: Show Runtime Output
Compile and Run save dirty files first. Only one runtime process is allowed per
extension host, and execution is disabled in untrusted workspaces.
Settings
| Setting |
Default |
Purpose |
bioscript.runtime.pythonPath |
auto |
Python executable |
bioscript.runtime.workingDirectory |
workspace |
Process working directory |
bioscript.runtime.maxWorkers |
4 |
Runtime worker count |
bioscript.runtime.seed |
0 |
Deterministic mutation seed |
bioscript.runtime.implicitHalt |
false |
Permit end-of-program without UAA |
bioscript.validation.enabled |
true |
Live diagnostics |
bioscript.validation.strictSource |
false |
Strict source characters and CLI parsing |
bioscript.validation.warnOnJunk |
true |
Junk-codon warnings |
bioscript.validation.maxSourceBytes |
1048576 |
Editor source-size limit |
bioscript.validation.delay |
200 |
Edit-to-diagnostic delay in milliseconds |
Both path settings support ${workspaceFolder}. Relative paths are resolved
against the file's workspace folder.
Install a local VSIX
Build the extension:
pnpm install
pnpm run test
pnpm run lint
pnpm run package
Then open VS Code's Command Palette, select
Extensions: Install from VSIX..., and choose the generated
bioscript-language-support-0.1.0.vsix.
Extension development
Open this directory in VS Code, run pnpm install, and press F5 to launch an
Extension Development Host. The pre-launch task compiles the TypeScript source.
Limitations
- Runtime commands require VS Code Desktop or a remote workspace extension host;
browser-only virtual workspaces are not supported.
- Live diagnostics intentionally mirror compilation structure but the Python
compiler remains authoritative.
- Cross-strand runtime output order remains concurrent and may vary.