Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompileCallback ¶
type CompileCallback func(error)
CompileCallback is called when compilation completes (success or failure)
type Config ¶
type Config struct {
Command string // eg: "go", "tinygo"
MainFilePath string // eg: web/main.server.go, web/main.wasm.go
OutName string // eg: app, user, main.server
Extension string // eg: .exe, .wasm
CompilingArguments func() []string // eg: []string{"-X 'main.version=v1.0.0'"}
OutFolder string // eg: web, web/public/wasm
Log io.Writer // output for log messages to integrate with other tools (e.g., TUI)
Callback CompileCallback // optional callback for async compilation
Timeout time.Duration // max compilation time, defaults to 5 seconds if not set
}
Config holds the configuration for Go compilation
type GoBuild ¶
GoBuild represents a Go compiler instance
func (*GoBuild) CompileProgram ¶
CompileProgram compiles the Go program If a callback is configured, it runs asynchronously and returns immediately Otherwise, it runs synchronously and returns the compilation result
func (*GoBuild) UnobservedFiles ¶
UnobservedFiles returns the list of files that should not be tracked by file watchers eg: main.exe, main_temp.exe
Click to show internal directories.
Click to hide internal directories.