Documentation
¶
Overview ¶
Package hostmodules is the union of every host module magus exposes to Buzz: std's own self-registering set (the 24 modules still living flat in std/*.go) plus std/encoding's nine explicitly-aggregated leaf packages (base64, csv, hex, ini, json, toml, url, xml, yaml).
The union has to be computed here, one layer above std, rather than inside std itself: std/encoding imports std for the Module vocabulary (Module, Method, Arg, Ret, TypeTag), so std importing std/encoding back to collect its nine modules would cycle. This package imports both and is the ONLY place that does - see std.Register's doc and std/encoding/register.go's package doc for the two ends of that constraint.
Every caller that needs "every host module magus has" - the CLI's describe command, magus\modules()/module(), the knowledge graph, the docs and bindings codegen, the manpage/manifest generators - reads through here rather than std.All()/std.Get() directly, so std.All() staying scoped to std's own 24 does not silently narrow what any of those surfaces reports.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func All ¶
All returns every host module: std's self-registered set plus std/encoding's explicitly aggregated set.
func Describe ¶
func Describe(name string) []types.ModuleEntry
Describe is the single typed core behind `magus describe modules` (the CLI formats it) and the native magus.modules()/magus.module() host methods (which marshal it to Buzz via ModuleEntry.BuzzObject). With name == "" it returns every module as a summary (name + doc); with a name it returns just that module with its fields and methods (and per-method Buzz signatures) populated, or an empty slice if the name is unknown. Routing both surfaces through this one function is what guarantees they can't drift.
This lived as std.DescribeModules until std/encoding split nine modules out of std's own registry: std's internal All() could no longer answer "every module" by itself (see this package's doc for why), so the function moved to the layer that can - every caller listed there already reads through here for the same reason.
Types ¶
This section is empty.