root

package
v0.5.0-2a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CompileCmd = &cobra.Command{
		Use:   "compile",
		Short: "Generate a stack binary's main.go from stack source",
		RunE: func(cmd *cobra.Command, args []string) error {
			return runCompile(cmd, compileCfg)
		},
	}
)
View Source
var (
	FetchCmd = &cobra.Command{
		Use:   "fetch",
		Short: "Resolve a stack's imports into the local cache",
		RunE: func(cmd *cobra.Command, args []string) error {
			return runFetch(cmd, fetchCfg)
		},
	}
)
View Source
var (
	FmtCmd = &cobra.Command{
		Use:   "fmt [paths...]",
		Short: "Format .ub source files",
		Long: `Reformat one or more .ub files in canonical form.

With no path arguments, fmt reads from stdin and writes the
formatted bytes to stdout. With one or more paths, each file is
formatted in turn; directory arguments are walked recursively for
*.ub files.

Flags:
  -w / --write   overwrite each file in place instead of writing to
                 stdout.
  -l / --list    print the names of files whose formatted output
                 differs from their current contents; no other output.

Examples:
  unobin fmt main.ub
  unobin fmt -w main.ub libraries/
  unobin fmt -l .
`,
		RunE: func(cmd *cobra.Command, args []string) error {
			return runFmt(cmd, args, fmtCfg)
		},
	}
)
View Source
var GenerateCmd = &cobra.Command{
	Use:   "generate",
	Short: "Generate code and scaffold libraries",
}
View Source
var (
	PrintGraphCmd = &cobra.Command{
		Use:   "print-graph",
		Short: "Print a stack's dependency graph without compiling it",
		Long: `Print a stack's dependency graph from its source.

Imports are resolved in memory; composite call sites are expanded
into their internal sub-nodes the same way the stack binary's
print-graph subcommand does. The output is intended to match what
the compiled binary would emit.

Examples:
  unobin print-graph -p main.ub
  unobin print-graph -p main.ub --format dot | dot -Tsvg > graph.svg`,

		RunE: func(cmd *cobra.Command, args []string) error {
			return runPrintGraph(cmd, printGraphCfg)
		},
	}
)
View Source
var Version = "dev"

Version is the build time version string. Set via -ldflags.

View Source
var (
	VersionCmd = &cobra.Command{
		Use:   "version",
		Short: "Print the unobin version",
		Run: func(cmd *cobra.Command, args []string) {
			cmd.Println(Version)
		},
	}
)

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL