native

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: GPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NativeVersion     = "17.3.2-abi1.1"
	FridaCoreVersion  = "17.3.2"
	ZlibVersion       = "1.3.1"
	NativeABIVersion  = uint32(1)
	NativeDLLFileName = "miniapp-frida.dll"
)
View Source
const (
	NativeDLLSize   = int64(67791872)
	NativeDLLSHA256 = "AEF471FB32E9BAF31C7B9F774BA76A5F4FFC0E379BB9C7E9A38783864999D44E"

	// NativeArchiveSHA256 pins the published archive for NativeVersion on
	// windows/amd64. Release assets for a native version are immutable.
	NativeArchiveSHA256 = "A63B7F121794DD9C6D51CAC9F47C6D0CE43EB61E753AC23075845630F6A76BFD"
)

Variables

View Source
var (
	ErrNativeMissing      = errors.New("native runtime missing")
	ErrNativeHashMismatch = errors.New("native runtime hash mismatch")
	ErrNativeWrongArch    = errors.New("native runtime architecture mismatch")
	ErrNativeManifest     = errors.New("native runtime manifest invalid")
	ErrNativeOffline      = errors.New("native runtime unavailable offline")
	ErrNativeDownload     = errors.New("native runtime download failed")
	ErrNativeCache        = errors.New("native runtime cache failure")
	ErrNativeArchive      = errors.New("native runtime archive invalid")
)

Functions

func CheckNativeRuntime

func CheckNativeRuntime(path string, manifests ...Manifest) error

CheckNativeRuntime validates the default pinned runtime, or an explicit manifest when supplied by a release/channel configuration.

func Prepare

func Prepare(ctx context.Context, opts PrepareOptions) (string, error)

func PrepareNativeRuntime

func PrepareNativeRuntime(ctx context.Context, opts PrepareOptions) (string, error)

func VerifyManifest

func VerifyManifest(path string, m Manifest) error

Types

type Error

type Error struct {
	Code      error
	Operation string
	Path      string
	Expected  string
	Actual    string
	Err       error
}

func (*Error) Error

func (e *Error) Error() string

func (*Error) Is

func (e *Error) Is(target error) bool

func (*Error) Unwrap

func (e *Error) Unwrap() error

type Manifest

type Manifest struct {
	Schema           string   `json:"schema"`
	NativeVersion    string   `json:"nativeVersion"`
	FridaCoreVersion string   `json:"fridaCoreVersion"`
	ZlibVersion      string   `json:"zlibVersion"`
	ABIVersion       uint32   `json:"abiVersion"`
	OS               string   `json:"os"`
	Arch             string   `json:"arch"`
	DLL              string   `json:"dll"`
	Size             int64    `json:"size"`
	SHA256           string   `json:"sha256"`
	RequiredExports  []string `json:"requiredExports"`
}

func DefaultManifest

func DefaultManifest() Manifest

type NativeRuntimeError

type NativeRuntimeError = Error

NativeRuntimeError is the stable name used by SDK adapters.

type PrepareOptions

type PrepareOptions struct {
	CacheDir           string
	SourceURL          string
	ExpectedArchiveSHA string
	Manifest           Manifest
	Offline            bool
	HTTPClient         *http.Client
}

Jump to

Keyboard shortcuts

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