Documentation
¶
Overview ¶
Package native loads native C and Rust shared-library images without linking Reflektor's Go c-shared runtime support.
Index ¶
Constants ¶
const MaxExportArguments = 3
MaxExportArguments is the maximum number of machine-word arguments accepted by CallExportWithArgs on every supported platform.
Variables ¶
ErrGoSharedLibraryUnsupported reports that LoadLibrary was given a Go c-shared image. Go c-shared images require the root reflektor package, whose runtime-aware loader intentionally has a larger process footprint.
var ErrLibraryClosed = errors.New("reflektor/native: library is closed")
ErrLibraryClosed reports an operation on a closed Library.
Functions ¶
This section is empty.
Types ¶
type Library ¶
type Library struct {
// contains filtered or unexported fields
}
Library is an in-memory native shared library.
func LoadLibrary ¶
LoadLibrary loads a native C or Rust shared-library image from memory. Images containing a Go runtime are rejected before platform loading begins.
func (*Library) CallExport ¶
CallExport resolves and calls a zero-argument exported function.
func (*Library) CallExportWithArgs ¶
CallExportWithArgs resolves an export, calls it with up to three machine-word arguments, and returns the value from the platform's primary return register.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
linuxmem
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT |
|
rejection
Package rejection owns native-loader errors shared by the public package and platform backends without introducing a dependency on Reflektor's root or memmod packages.
|
Package rejection owns native-loader errors shared by the public package and platform backends without introducing a dependency on Reflektor's root or memmod packages. |