ffihost

package
v1.0.8-preview.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NaturalLibraryName

func NaturalLibraryName() string

NaturalLibraryName is the natural platform shared-library file name for the runtime cdylib — the `.node` file renamed to what a Rust cdylib would be called on this OS. The library is loaded by absolute path, so the on-disk name is ours to choose; this matches the flat name the bundler installs next to the CLI binary and the name the other SDKs use.

func PrebuildsFolder

func PrebuildsFolder() string

PrebuildsFolder returns the napi-rs `<node-platform>-<arch>` folder name the runtime package ships under prebuilds/ (e.g. linux-x64, darwin-arm64, win32-x64, including the musl variant on Alpine). Returns "" for unsupported platforms.

func ResolveLibraryPath

func ResolveLibraryPath(cliEntrypoint string) (string, error)

ResolveLibraryPath resolves the native runtime library next to the given CLI entrypoint. It checks, in order:

  1. The natural platform library name next to the CLI (bundled/flat layout).
  2. prebuilds/<platform>/runtime.node next to the CLI (dev/package layout).

It returns an error when neither exists.

Types

This section is empty.

Jump to

Keyboard shortcuts

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