core
github.com/webong/ext/pkg/ext-go/core owns driver selection and the
engine-independent helpers. It never imports engine or cengine. The plugin
and ledger contracts live in engine (engine/plugin,
engine/plugin/interop and engine/ledger/...).
| Package |
Responsibility |
wasm |
The protocol-neutral WebAssembly host contract, without wazero or the plugin engine |
driver |
Library-independent driver selection, using only the standard library |
dirlock |
An exclusive directory lock for cooperating processes, shared by ext and its products (package, adapter and browser writers) |
Engine implementations and native bindings depend on core; core never depends
on them. Core requires Go 1.25 and uses only the standard library. Consumers own host-selection policy.
| Driver |
Where the code is |
go |
the library's pure-Go implementation in engine |
purego |
a built copy of the C library, opened by cengine |
cgo |
cgoengine, linked against the C library when the program is built |
c2go |
c2goengine, the C library translated to Go |
driver.Choose takes one by name, by EXT_ENGINE, or with Auto the best available one in the order
cgo, c2go, purego, go. A name that cannot be served is an error, never another driver.
The module has no root package: the umbrella published its engine selection package at the import
path pkg/ext-go/core up to v0.12.0 (that package is gone), and a root package here would give
a program that requires both an ambiguous import.
Drivers and plugin backends
Drivers select how Go accesses a canonical C library: linked cgo, translated C,
or a shared library through purego. The legacy go selection exists only where
an implementation still provides it. Plugin backends select how a guest executes:
Yaegi source interpretation, WASM, or HashiCorp RPC. They consume the engine's contracts;
core imports none of those runtimes and remains standard-library-only.