engines

package
v1.0.0-beta.35 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ManifestFilename = "engine.yaml"

Variables

View Source
var ErrManifestNotFound = errors.New("engine manifest not found")

Functions

func Validate

func Validate(manifestFilePath string) error

Types

type CompatibilityReport

type CompatibilityReport struct {
	CompatibleMemory bool
	RequiredMemory   uint64
	TotalRAM         uint64
	TotalSwap        uint64

	CompatibleDisk     bool
	RequiredDiskSpace  uint64
	AvailableDiskSpace uint64

	CompatibleDevices bool
}

func (CompatibilityReport) EngineCompatible

func (c CompatibilityReport) EngineCompatible() bool

type Configurations

type Configurations map[string]interface{}

type Device

type Device struct {
	// General
	Type string `yaml:"type,omitempty" json:"type,omitempty"` // cpu, gpu, npu or nil
	Bus  string `yaml:"bus,omitempty" json:"bus,omitempty"`   // pci, usb or nil

	// CPUs
	Architecture *string `yaml:"architecture,omitempty" json:"architecture,omitempty"`

	// CPU x86
	ManufacturerId *string  `yaml:"manufacturer-id,omitempty" json:"manufacturer-id,omitempty"`
	Flags          []string `yaml:"flags,omitempty" json:"flags,omitempty"`

	// CPU arm64
	ImplementerId *types.HexInt `yaml:"implementer-id,omitempty" json:"implementer-id,omitempty"`
	PartNumber    *types.HexInt `yaml:"part-number,omitempty" json:"part-number,omitempty"`
	Features      []string      `yaml:"features,omitempty" json:"features,omitempty"`

	// PCI
	VendorId *types.HexInt `yaml:"vendor-id,omitempty" json:"vendor-id,omitempty"`
	DeviceId *types.HexInt `yaml:"device-id,omitempty" json:"device-id,omitempty"`

	// GPU additional properties
	VRam              *string `yaml:"vram,omitempty" json:"vram,omitempty"`
	ComputeCapability *string `yaml:"compute-capability,omitempty" json:"compute-capability,omitempty"`

	// Drivers
	SnapConnections []string `yaml:"snap-connections,omitempty" json:"snap-connections,omitempty"`

	// General
	CompatibilityIssues []string `yaml:"compatibility-issues,omitempty" json:"compatibility-issues,omitempty"`
}

type Devices

type Devices struct {
	Anyof []Device `yaml:"anyof,omitempty" json:"anyof"`
	Allof []Device `yaml:"allof,omitempty" json:"allof"`
}

type Manifest

type Manifest struct {
	Name        string `yaml:"name" json:"name"`
	Description string `yaml:"description" json:"description"`
	Vendor      string `yaml:"vendor" json:"vendor"`
	Grade       string `yaml:"grade" json:"grade"`

	Devices   Devices `yaml:"devices" json:"devices"`
	Memory    *string `yaml:"memory,omitempty" json:"memory"`
	DiskSpace *string `yaml:"disk-space,omitempty" json:"disk-space"`

	Components     []string       `yaml:"components" json:"components"`
	Configurations Configurations `yaml:"configurations" json:"configurations"`
}

func LoadManifest

func LoadManifest(manifestsDir, engineName string) (*Manifest, error)

func LoadManifests

func LoadManifests(manifestsDir string) ([]Manifest, error)

type ScoredManifest

type ScoredManifest struct {
	Manifest            `yaml:",inline"`
	Score               int                 `yaml:"score" json:"score"`
	CompatibilityReport CompatibilityReport `yaml:"-" json:"-"`
}

Jump to

Keyboard shortcuts

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