Files
sarasacw-omrf/packer/README.md
T
2026-08-03 15:15:18 +08:00

2.0 KiB

sarasacw-omrf-packer

All packer used properties are stored in target Rust manifest file as metadata style. There is an example about how to define them in Cargo.toml.

[package.metadata.omrf]
# Configures the minimum required sarasacw-omrf-packer version. 
# Trying to run with an older version causes an error.
# This property is optional. If there is no specification, no version constraint is applied.
min_version = "1.0.0"

[package.metadata.omrf.headers]
assets = [
    # `from` is the relative path to directory where this Cargo.toml is.
    # `to` is the relative path to `include` directory which is the subdirectory of installation directory.
    # Blank `to` means that put it directly in `include` directory.
    { from = "cbindgen/my_crate.h", to = "" },
    { from = "cbindgen/our_crate.h", to = "SomePrefix" },
    # `from` support UNIX style pathname pattern expansion.
    # It will find the toppest immutable component of given pattern.
    # In this exmaple, this toppest immutable component is `pattern/with`.
    # And use that as the root directory and put found files to `to` directory 
    # with preserving directory hierarchy.
    { from = "pattern/with/**/*", to = "" }
    { from = "pattern/with/**/*", to = "AllInOne" }
]

[package.metadata.omrf.cmake]
# Configures the namespace part of CMake target.
# This property is optional. The default value is extracted from the name of target Rust project.
namespace_name = "foobar"
# Configures the target part of CMake target.
# This property is optional. The default value is extracted from the name of target Rust project.
target_name = "foobar"

[package.metadata.omrf.pkgconfig]
# Configures the human-readable name of this package.
# This property is optional. The default value is extracted from the name of target Rust project.
name = "Foo Bar"
# Configures the brief description of this package.
# This property is optional. The default value is extracted from the description of target Rust project.
name = "a brown fox jumps over a lazy dog."