The PHP half of the sodium stand-in: the constants, SodiumException and a wrapper for each
function of ext-sodium, over the host library in sodium-lib.ts.
The rule for extension_loaded('sodium') is conditional. It answers true only when the
conformance manifest (generated/sodium-manifest.ts, written by the gate in
tests/node/sodium-conformance.spec.ts) covers every function, constant and class of the
native inventory (generated/sodium-api.ts); the table that decides is extension-table.ts.
This fragment guards on its own flag and on function_exists, never on that answer. A stub
extension entry in the engine is not used: one crashed the isolate (exit 139) when tried for
mbstring.
The PHP half of the sodium stand-in: the constants,
SodiumExceptionand a wrapper for each function of ext-sodium, over the host library insodium-lib.ts.The rule for
extension_loaded('sodium')is conditional. It answers true only when the conformance manifest (generated/sodium-manifest.ts, written by the gate intests/node/sodium-conformance.spec.ts) covers every function, constant and class of the native inventory (generated/sodium-api.ts); the table that decides isextension-table.ts. This fragment guards on its own flag and onfunction_exists, never on that answer. A stub extension entry in the engine is not used: one crashed the isolate (exit 139) when tried for mbstring.