Documentation
¶
Index ¶
- func Clean(patterns []string, conf *Config)
- func IsDbgEnabled() bool
- func IsDbgSymsEnabled() bool
- func IsFullRpathEnabled() bool
- func IsOptimizeEnabled() bool
- func IsStdioNobuf() bool
- func IsTraceEnabled() bool
- func IsWasiThreadsEnabled() bool
- func ValidateBuildMode(mode string) error
- func WasmRuntime() string
- type AbiMode
- type BuildMode
- type Config
- type Mode
- type OutFmtDetails
- type OutFmts
- type OutputCfg
- type Package
- type Rewrites
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDbgEnabled ¶ added in v0.11.0
func IsDbgEnabled() bool
func IsDbgSymsEnabled ¶ added in v0.11.0
func IsDbgSymsEnabled() bool
func IsFullRpathEnabled ¶ added in v0.11.6
func IsFullRpathEnabled() bool
func IsOptimizeEnabled ¶ added in v0.9.8
func IsOptimizeEnabled() bool
func IsStdioNobuf ¶ added in v0.11.1
func IsStdioNobuf() bool
func IsTraceEnabled ¶ added in v0.11.0
func IsTraceEnabled() bool
func IsWasiThreadsEnabled ¶ added in v0.11.1
func IsWasiThreadsEnabled() bool
func ValidateBuildMode ¶ added in v0.11.6
ValidateBuildMode checks if the build mode is valid
func WasmRuntime ¶ added in v0.11.1
func WasmRuntime() string
Types ¶
type Config ¶
type Config struct {
Goos string
Goarch string
Target string // target name (e.g., "rp2040", "wasi") - takes precedence over Goos/Goarch
BinPath string
AppExt string // ".exe" on Windows, empty on Unix
OutFile string // only valid for ModeBuild when len(pkgs) == 1
OutFmts OutFmts // Output format specifications (only for Target != "")
Emulator bool // run in emulator mode
Port string // target port for flashing
BaudRate int // baudrate for serial communication
RunArgs []string
Mode Mode
BuildMode BuildMode // Build mode: exe, c-archive, c-shared
AbiMode AbiMode
GenExpect bool // only valid for ModeCmpTest
Verbose bool
GenLL bool // generate pkg .ll files
CheckLLFiles bool // check .ll files valid
CheckLinkArgs bool // check linkargs valid
ForceEspClang bool // force to use esp-clang
Tags string
// GlobalRewrites specifies compile-time overrides for global string variables.
// Keys are fully qualified package paths (e.g. "main" or "github.com/user/pkg").
// Each Rewrites entry maps variable names to replacement string values. Only
// string-typed globals are supported and "main" applies to all root main
// packages in the current build.
GlobalRewrites map[string]Rewrites
}
func NewDefaultConf ¶
type OutFmtDetails ¶ added in v0.11.6
type OutFmtDetails struct {
Out string // Base output file path
Bin string // Binary output file path (.bin)
Hex string // Intel hex output file path (.hex)
Img string // Image output file path (.img)
Uf2 string // UF2 output file path (.uf2)
Zip string // ZIP/DFU output file path (.zip)
}
OutFmtDetails contains detailed output file paths for each format
func (*OutFmtDetails) ToEnvMap ¶ added in v0.11.6
func (details *OutFmtDetails) ToEnvMap() map[string]string
ToEnvMap converts OutFmtDetails to a map for template substitution
type OutFmts ¶ added in v0.11.6
type OutFmts struct {
Bin bool // Generate binary output (.bin)
Hex bool // Generate Intel hex output (.hex)
Img bool // Generate image output (.img)
Uf2 bool // Generate UF2 output (.uf2)
Zip bool // Generate ZIP/DFU output (.zip)
}
OutFmts contains output format specifications for embedded targets
type OutputCfg ¶ added in v0.11.6
type OutputCfg struct {
OutPath string // Final output file path
IntPath string // Intermediate file path (for two-stage conversion)
OutExt string // Output file extension
FileFmt string // File format (from conf.FileFormat or extracted from emulator)
BinFmt string // Binary format for firmware conversion (may have -img suffix)
NeedFwGen bool // Whether firmware image generation is needed
DirectGen bool // True if can generate firmware directly without intermediate file
}
OutputCfg contains the generated output paths and conversion configuration
Click to show internal directories.
Click to hide internal directories.