jsruntime

package
v1.58.5 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompileNativeModuleInput

type CompileNativeModuleInput struct {
	Host   HostInfo
	Target Platform

	// The cargo 'target' directory to use for compiled outputs.
	CargoTargetDir FSPath

	// The path to the macOS SDK. Only needed when cross-compiling to macOS
	// from another OS; native macOS builds use the Xcode toolchain.
	CrossMacSDKPath option.Option[FSPath]

	// Optional file path to write NAPI type definitions to.
	// Must be set if we're generating NAPI type definitions in this build.
	NapiTypeDefPath option.Option[FSPath]

	// Version string to embed in the native module.
	Version string

	// True if it should be built with `--release`.
	ReleaseBuild bool

	// True if the output is for distribution, as opposed to
	// only running on the host machine (or running tests).
	//
	// Ensures the output is compatible with common glibc versions,
	// for example.
	ForDistribution bool
}

type CompileNativeModuleOutput

type CompileNativeModuleOutput struct {
	// Path to the built native module.
	// Will be within the provided OutputDir.
	NativeModule FSPath
	Checksum     FSPath
}

func CompileNativeModule

CompileNativeModule compiles the native module for the JS runtime.

type PrepareNPMPackageInput

type PrepareNPMPackageInput struct {
	Version         string
	PackagePath     FSPath
	NapiTypeDefPath FSPath
}

type PrepareNPMPackageOutput

type PrepareNPMPackageOutput struct {
	// Path to the built package, as a .tar.gz file.
	PackageTargz FSPath
}

Jump to

Keyboard shortcuts

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