Skip to main content

Export

This object includes configurations related to lib generation.

Here is a minimal example:

export default {
export: {
type: 'cmake',
libName: ['webp', 'sharpyuv'],
},
paths: {
config: import.meta.url,
},
};

Attributes

NameTypeDefaultDescription
typestringcmakeoptions: source, cmake, cargo. cargo builds a Rust crate per platform and stages the static library like any prebuilt — see Using Rust
cratestring.type: 'cargo' only: directory holding Cargo.toml, relative to the project
libNamestring[config.general.name]Names of output libraries. Typically used for generating multiple libraries
bindings.vectorsarrayStandalone Vec<T> classes to expose, e.g. [{ of: 'i32', name: 'RustIntVector' }]

Rust crates your project consumes are NOT declared here — they live in the top-level cargoDependencies map, next to dependencies.


tip

Below are examples demonstrating various uses of the configurations.