nativeload

package
v0.0.0-...-3f3fba7 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package nativeload extracts and loads embedded FerrumGUI engine shared libraries.

Extraction writes into a versioned user cache directory (never the Go module cache). Cache paths include the artifact SHA-256 so distinct binaries never collide. Libraries are opened by absolute path to reduce DLL hijacking risk.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentKey

func CurrentKey(engineVersion string, abi uint32) string

CurrentKey returns the registry lookup key for this process platform. SHA is resolved from the registered artifact for this GOOS/GOARCH/version/abi.

func OpenLibrary

func OpenLibrary(absPath string) (uintptr, error)

OpenLibrary loads a shared library from an absolute path using dlopen. RTLD_NOW|RTLD_LOCAL avoids lazy undefined-symbol surprises and does not export symbols into the global namespace.

func Register

func Register(a Artifact) error

Register makes an embedded artifact available for the current process.

Types

type Artifact

type Artifact struct {
	Manifest Manifest
	Bytes    []byte
}

Artifact is an embedded library payload plus its manifest.

type Manifest

type Manifest struct {
	Name          string `json:"name"`
	File          string `json:"file"`
	EngineVersion string `json:"engine_version"`
	ABIVersion    uint32 `json:"abi_version"`
	GOOS          string `json:"goos"`
	GOARCH        string `json:"goarch"`
	TargetTriple  string `json:"target_triple"`
	SHA256        string `json:"sha256"`
	SizeBytes     int64  `json:"size_bytes"`
	BuildProfile  string `json:"build_profile"`
	Provenance    string `json:"provenance"`
	LicenseBundle string `json:"license_bundle"`
}

Manifest describes one embedded native artifact.

func EnsureLibrary

func EnsureLibrary(engineVersion string, abi uint32) (string, *Manifest, error)

EnsureLibrary extracts (if needed) and returns an absolute path to the native library.

func ParseManifestJSON

func ParseManifestJSON(data []byte) (Manifest, error)

ParseManifestJSON decodes a manifest document.

Jump to

Keyboard shortcuts

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