Skip to main content

Module platform

Module platform 

Source
Expand description

The target-platform model that the packaging pipeline shares.

weaveffi generate emits binding source; weaveffi package goes further and assembles publishable packages that bundle a prebuilt native library for each platform. To do that without every backend re-deriving the same facts, this module is the single source of truth for the supported platforms and the per-ecosystem identifiers each one maps to:

  • the Rust target triple (aarch64-apple-darwin, …) used by --build;
  • the shared-library file name (libfoo.dylib, foo.dll, …);
  • the NuGet runtime identifier (osx-arm64, …);
  • the Node.js process.platform/process.arch tokens;
  • the Python wheel platform tag (macosx_11_0_arm64, …); and
  • the RubyGems platform string (arm64-darwin, …).

A BinarySet pairs each Platform with the on-disk path to its prebuilt library; the crate::package driver and every packaging backend consume it.

Structs§

BinarySet
The set of prebuilt native libraries to bundle into a package, keyed by platform.
NativeBinary
One prebuilt native library: the Platform it targets and the on-disk path to the shared library file to bundle.

Enums§

Arch
The CPU architecture of a Platform.
Os
The operating-system family of a Platform.
Platform
A single native target platform WeaveFFI can build for and bundle a prebuilt library into a published package.