Documentation
¶
Overview ¶
module-routes example — mount HIP-0105 extension modules as routes.
The loader is constructed by the embedding binary (typically *extruntime.Loader from hanzoai/base/plugins/extruntime, with gojavm + wasmvm + pyvm + starlarkvm registered). zip is a CONSUMER of the loader — it accepts anything that satisfies zip.Loader, which is declared at the zip root so this example compiles with no JS toolchain.
This example stubs a tiny in-memory loader so the example compiles without pulling hanzoai/base. In production, back it with *extruntime.Loader through an adapter that returns zip.Module — Go requires identical result types, so extruntime's own Module type does not satisfy zip.Loader by direct assignment.