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 ¶
func CompileNativeModule(ctx context.Context, in CompileNativeModuleInput) (*CompileNativeModuleOutput, error)
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
}
func PrepareNPMPackage ¶
func PrepareNPMPackage(ctx context.Context, in PrepareNPMPackageInput) (*PrepareNPMPackageOutput, error)
Click to show internal directories.
Click to hide internal directories.