Softanza
StartFrançais
Softanza
I/O, formats, extensibility, media

Extensibility & foreign code

Strong at consuming foreign libraries, pragmatic at bridging; the plugin, FFI and embed plane is mostly planned.

1 Strong · 2 Solid · 3 Partial · 6 Emerging

Measured against: FFI · Pyodide · Folders: base/plugin(opens in a new tab) · base/extercode(opens in a new tab) · base/extincode(opens in a new tab) · For programmers: this area's reference

the engine in the middle, four languages and C at arm's length, each through one governed door
the engine in the middle, four languages and C at arm's length, each through one governed door. drawn on 2026-10-01 by the site's script tools/areas-figurative.ring, run inside the library at commit 0e72e2e2c · the source(opens in a new tab)

Rethought from first principles

What Softanza kept from what works, and what it rethought, as the library wrote it down in its design documents and narrations.

The Softanza wayA plugin is governed foreign capability: code the host does not own, run under a contract the host enforces.

Kept from the best practice

  • Each language does what it does best: Python for machine learning, R for statistics, Julia for science, Prolog for logic, all driven through one interface. source(opens in a new tab)
  • Foreign code runs in its own runtime, kept apart from the host. Data is converted on the way in and out, and the console output is logged. source(opens in a new tab)
  • Isolation is chosen per plugin: a cheap separate state inside the process, or a separate process that survives crashes and can be stopped by force. source(opens in a new tab)

Rethought

  • A plugin receives a value and returns a value; it never reaches into the host. Stray effects on the host are impossible by construction, not forbidden by promise. (planned) source(opens in a new tab)
  • No false sandbox claim: the in-process tier is said to resist buggy plugins, not malicious ones. An untrusted source is allowed only in a separate process. (planned) source(opens in a new tab)
  • Built so a program can accept code it does not trust, even written by a model: every call is logged with its author, and every change can be undone. (planned) source(opens in a new tab)
  • A solution found online in another language can be pasted and run with small changes, because helpers mirror that language's functions, like Python's range. source(opens in a new tab)

The most honestly-mixed group in the survey. Softanza consumes a large, carefully-vendored foreign-code stack (tree-sitter, SQLite, curl, mbedTLS, zlib, ggml, RmlUi, HarfBuzz, PCRE2, all compiled from source) and bridges pragmatically to Python/R/Julia/C/Prolog/Node by subprocess, but the extensibility the group is named for is overwhelmingly planned: no in-process FFI, no embedded interpreter, and the plugin plane ('a plugin is governed foreign capability') is a detailed plan with a recovered reference archive but zero live code.

What a crafter does with it, and what stands out

  • Strong foreign-code integration: a dozen serious native libraries built from source with no runtime dependencies
  • Governed foreign capability (designed): accept code you don't trust, audit what it did, undo it
  • SQL-in-Haro and paste-and-tweak foreign-syntax shims
  • The recovered 2024 plugin system proves per-call VM-state isolation works (~3.1 ms/call)

What is owed

  • Fix the red interop suites (C22 duplicate shim definitions, 0 passing)
  • Build the plugin plane (PL0-PL5)
  • In-process FFI (dlopen / cffi-style)
  • Configurable toolchain discovery (retire the hardcoded d: interpreter paths)

The Softanza way, run

What Softanza does differently in this area, shown by code taken from its narrations and guards, and run for this page.

Helpers mirror Python's range, with the end excluded and steps allowed, so code ported from Python keeps its meaning.

Softanza
Then("range0(3) = [0..2]", @@(range0(3)), "[ 0, 1, 2 ]")
Then("range0([1, 4]) = [1..3]", @@(range0([1, 4])), "[ 1, 2, 3 ]")
Then("range0([1, 6, 2]) steps by 2", @@(range0([1, 6, 2])), "[ 1, 3, 5 ]")
Then("range0([5, 1, -1]) walks backward", @@(range0([5, 1, -1])), "[ 5, 4, 3, 2 ]")
Output
  THEN  range0(3) = [0..2]  [PASS]
  THEN  range0([1, 4]) = [1..3]  [PASS]
  THEN  range0([1, 6, 2]) steps by 2  [PASS]
  THEN  range0([5, 1, -1]) walks backward  [PASS]

run on 2026-10-01 21:18 inside the library at commit 0e72e2e2c; taken from base/test/extincode/51_extincode_narrated.ring(opens in a new tab)

The articles of this area (5)

The lanes, one by one

Lanes and their notes are quoted as they were read at the source, on Read from the source on 2026-09-16, from a read-only main worktree -- base/extercode and base/extincode loaded in stzBase; base/plugin = plan + recovered/ archive, not loaded; test/plugin absent.

Foreign-library consumption (the vendored stack)
Strong
A vendored C/C++ stack compiled from source via Zig (tree-sitter, SQLite, curl, mbedTLS, zlib, ggml, RmlUi, HarfBuzz, PCRE2); no external runtime deps
Foreign-code parsing (tree-sitter)
Solid
stz_polyglot parses Python and JavaScript (vendored grammars, no interpreter) into a declaration/call protocol feeding stzCodeGraph; two grammars, parse-onlystz_polyglot
External-tool bridges
Solid
Subprocess bridges stzDotCode (Graphviz dot), stzQmlCode (Qt qml runtime), stzImgToAscii (vendored im2ansi.exe); stzImgToAscii ships but is never loaded
Call-out interop (extercode)
Partial
stzExterCode runs Python, R, Julia, C, Prolog and Node via temp file + stzSystemCall + eval(); subprocess-only, hardcoded d: paths, suite currently redtest/extercode (red)
Foreign-syntax shims (extincode)
Partial
Haro shims to paste Python, PHP, C#, Perl, C ternaries and SQL-in-Haro over stzTable; shims not a runtime, the JS shim is an empty stub, suite redtest/extincode (red)
Interop robustness (test state)
Partial
Both interop suites have real assertions but are entirely red: C22 function-redefinition, 0 passing (echo/range0 defined in both PHP and Python shims)test/extercode + test/extincode
In-process FFI
Emerging
None for user code: no dlopen / cffi / direct-C-call surface; the only call-out is the subprocess bridge, an order of magnitude heavier
Embedded interpreters (Pyodide-style)
Emerging
None: no in-process Python / JS / Lua interpreter embedded in the engine; foreign execution is subprocess-only
Plugin plane -- load / register / govern
Emerging
A plan of record (PL0-PL5) and a recovered/ archive marked reference-only; state_* VM primitives exist; no live code, not loaded, no test dirSOFTANZA_PLUGIN_PLAN.md; recovered/ 2024 system (~3.1 ms/call)
Governance of untrusted capability
Emerging
Designed five-clause contract: isolation, per-call ledger, cooperative constraint, currency, governance; XfU reversal and @plugin_author provenance; unbuilt
Isolation & sandboxing
Emerging
Designed two-tier isolation (:State state / :Process reactor spawn); explicitly refuses to be a syscall-level security sandbox; unbuilt
Distribution -- package / marketplace / signing
Emerging
None, and the plugin plan explicitly states it is not a package manager, marketplace or code-signing scheme; deliberately deferred