compiler

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCoreFile added in v0.2.0

func GetCoreFile(lang string) (string, error)

func GetEmptyCompiler added in v0.2.0

func GetEmptyCompiler(lang string) (compiler, error)

GetEmptyCompiler retrieve correct compiler based on language

func GetProperArch added in v0.2.0

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

func GetSupportedLangs added in v0.2.0

func GetSupportedLangs(lang string) bool

func IsTargetCompilerInstalled added in v0.2.0

func IsTargetCompilerInstalled(target string) (string, error)

Types

type BuildData added in v0.2.0

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 added in v0.2.0

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 added in v0.2.0

func NewEmptyCConfig() *CConfig

func (*CConfig) Build added in v0.2.0

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

func (*CConfig) GetDebugImports added in v0.2.0

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

func (*CConfig) GetExportNames added in v0.2.0

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

func (*CConfig) IsTypeSupported added in v0.2.0

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

func (*CConfig) PrepareBuild added in v0.2.0

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 added in v0.2.0

func NewEmptyGoConfig() *GoConfig

func (*GoConfig) Build added in v0.2.0

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

func (*GoConfig) BuildGoBuildCommand

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

func (*GoConfig) GetDebugImports added in v0.2.0

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

func (*GoConfig) GetExportNames added in v0.2.0

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

func (*GoConfig) GetGarbleArgs

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

func (*GoConfig) IsTypeSupported added in v0.2.0

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

IsTypeSupported retrieves build info based on type of executable

func (*GoConfig) PrepareBuild added in v0.2.0

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

type GoMod added in v0.2.0

type GoMod struct {
	RandomName string
}

Jump to

Keyboard shortcuts

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