compiler

package
v0.0.0-...-d8351b9 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCoreFile

func GetCoreFile(lang string) (string, error)

func GetEmptyCompiler

func GetEmptyCompiler(lang string) (compiler, error)

GetEmptyCompiler retrieve correct compiler based on language

func GetProperArch

func GetProperArch(arch string, lang string) (string, error)

func GetSupportedLangs

func GetSupportedLangs(lang string) bool

func IsTargetCompilerInstalled

func IsTargetCompilerInstalled(target string) (string, error)

Types

type BuildData

type BuildData struct {
	TargetOs     string
	Arch         string
	DirPath      string
	BuildMode    string
	Keep         bool
	Trimpath     bool
	Obfuscation  bool
	Imports      []string
	ArtifactList []string
	DataTemplate embed.FS
	FileProps    string
}

type CConfig

type CConfig struct {
	ProjectDir     string
	TargetOs       string
	TargetCompiler string

	OutDir        string
	CompileFlags  []string
	ExportDefPath string
	ArtifactList  []string
	Env           []string
	// contains filtered or unexported fields
}

func NewEmptyCConfig

func NewEmptyCConfig() *CConfig

func (*CConfig) Build

func (c *CConfig) Build(payload, dest string) ([]byte, error)

func (*CConfig) GetDebugImports

func (c *CConfig) GetDebugImports() []string

func (*CConfig) GetExportNames

func (c *CConfig) GetExportNames(extension string) string

func (*CConfig) IsTypeSupported

func (c *CConfig) IsTypeSupported(t string) (string, string, error)

func (*CConfig) PrepareBuild

func (c *CConfig) PrepareBuild(buildData BuildData) error

type GoConfig

type GoConfig struct {
	ProjectDir   string
	GOOS         string
	GOARCH       string
	GOCACHE      string
	Buildmode    string
	Keep         bool
	Trimpath     bool
	Obfuscation  bool
	Path         string
	CompilerPath string

	Imports []string
	Command []string
	Env     []string
}

func NewEmptyGoConfig

func NewEmptyGoConfig() *GoConfig

func (*GoConfig) Build

func (g *GoConfig) Build(payload, dest string) ([]byte, error)

func (*GoConfig) BuildGoBuildCommand

func (g *GoConfig) BuildGoBuildCommand(payload, dest string)

func (*GoConfig) GetDebugImports

func (g *GoConfig) GetDebugImports() []string

func (*GoConfig) GetExportNames

func (g *GoConfig) GetExportNames(extension string) string

func (*GoConfig) GetGarbleArgs

func (g *GoConfig) GetGarbleArgs(command []string) []string

func (*GoConfig) IsTypeSupported

func (g *GoConfig) IsTypeSupported(t string) (string, string, error)

IsTypeSupported retrieves build info based on type of executable

func (*GoConfig) PrepareBuild

func (g *GoConfig) PrepareBuild(buildData BuildData) error

type GoMod

type GoMod struct {
	RandomName string
}

Jump to

Keyboard shortcuts

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