Documentation
¶
Index ¶
- Constants
- Variables
- func ClearCurrentProgramState()
- func DoMain(regfn func(*env.ProgramState) error)
- func DoReexecInUnshare(_ UnshareConfig)
- func GetScriptDirectory() string
- func IsUnshareChild() bool
- func SetCurrentProgramState(ps *env.ProgramState)
- func SetupUnshareFilesystem() error
- type UnshareConfig
Constants ¶
const Option_Do_Main bool = false
const Option_Embed_Main bool = false
Variables ¶
var ( // Seccomp options (Linux only) - using pure Go library SeccompProfile = flag.String("seccomp-profile", "", "Seccomp profile to use: strict, readonly") SeccompAction = flag.String("seccomp-action", "errno", "Action on restricted syscalls: errno, kill, trap, log") // Landlock options (Linux only) - using landlock-go library LandlockEnabled = flag.Bool("landlock", false, "Enable landlock filesystem access control") LandlockProfile = flag.String("landlock-profile", "readonly", "Landlock profile: readonly, readexec, custom") LandlockPaths = flag.String("landlock-paths", "", "Comma-separated list of paths to allow access to (for custom profile)") // HTTP options HttpPort = flag.String("http", "", "Start Rye in HTTP REPL mode on specified port (localhost only)") // Code signing options CodeSigEnforced = flag.Bool("codesig", false, "Enforce code signature verification") // Unshare options (Linux only) - namespace isolation via re-exec // Inspect/debugging options NoInspect = flag.Bool("noinspect", false, "Exit immediately on error without showing debugging options") )
var CurrentScriptDirectory string
CurrentScriptDirectory stores the directory of the currently executing script
var Rye_files embed.FS
var Version = "development"
Version variable is set during build using -ldflags eg in Goreleaser: https://goreleaser.com/cookbooks/using-main.version
Functions ¶
func ClearCurrentProgramState ¶ added in v0.0.88
func ClearCurrentProgramState()
ClearCurrentProgramState unregisters the program state
func DoMain ¶
func DoMain(regfn func(*env.ProgramState) error)
func DoReexecInUnshare ¶ added in v0.2.3
func DoReexecInUnshare(_ UnshareConfig)
DoReexecInUnshare prints an error and exits on non-Linux systems because Linux namespaces are not available.
func GetScriptDirectory ¶ added in v0.0.81
func GetScriptDirectory() string
GetScriptDirectory returns the directory of the currently executing script
func IsUnshareChild ¶ added in v0.2.3
func IsUnshareChild() bool
IsUnshareChild always returns false on non-Linux systems.
func SetCurrentProgramState ¶ added in v0.0.88
func SetCurrentProgramState(ps *env.ProgramState)
SetCurrentProgramState registers the currently executing program state for signal handling
func SetupUnshareFilesystem ¶ added in v0.2.3
func SetupUnshareFilesystem() error
SetupUnshareFilesystem is a no-op on non-Linux systems.
Types ¶
type UnshareConfig ¶ added in v0.2.3
type UnshareConfig struct {
}
UnshareConfig holds the namespace isolation options. On non-Linux systems these options are parsed but have no effect.
func ReadUnshareChildConfig ¶ added in v0.2.3
func ReadUnshareChildConfig() UnshareConfig
ReadUnshareChildConfig returns a zero-value config on non-Linux systems.