2026-08-03 14:22:56 +08:00
|
|
|
# sarasacw-omrf-packer
|
|
|
|
|
|
2026-08-03 16:05:08 +08:00
|
|
|
## Metadata
|
|
|
|
|
|
2026-08-03 14:22:56 +08:00
|
|
|
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`.
|
|
|
|
|
|
|
|
|
|
```toml
|
|
|
|
|
[package.metadata.omrf]
|
2026-08-03 16:05:08 +08:00
|
|
|
# Minimum required version of sarasacw-omrf-packer.
|
|
|
|
|
# Running with an older version fails with an error.
|
|
|
|
|
# This property is optional; when omitted, no version constraint is enforced.
|
2026-08-03 14:22:56 +08:00
|
|
|
min_version = "1.0.0"
|
|
|
|
|
|
2026-08-03 16:05:08 +08:00
|
|
|
# Header files to distribute. Each entry installs one file (or, with glob
|
|
|
|
|
# expansion, a set of files) into the `include` directory of the installation.
|
|
|
|
|
# Each entry carries a `from` source path and a `to` destination path.
|
|
|
|
|
# This property is required. If you really want to distribute nothing header files,
|
|
|
|
|
# leave empty list here.
|
|
|
|
|
headers = [
|
|
|
|
|
# `from` is a path relative to the directory that contains this `Cargo.toml`.
|
|
|
|
|
# `to` is a path relative to the `include` directory (a subdirectory of the install directory).
|
|
|
|
|
# An empty `to` places the file directly under the `include` directory.
|
2026-08-03 14:22:56 +08:00
|
|
|
{ from = "cbindgen/my_crate.h", to = "" },
|
|
|
|
|
{ from = "cbindgen/our_crate.h", to = "SomePrefix" },
|
2026-08-03 16:05:08 +08:00
|
|
|
# `from` also supports UNIX-style glob (pathname) expansion.
|
|
|
|
|
# The matcher uses the leading literal portion of the pattern (`pattern/with`
|
|
|
|
|
# here) as the root directory and copies every matched file into the `to`
|
|
|
|
|
# directory, preserving the directory hierarchy beneath that root.
|
|
|
|
|
{ from = "pattern/with/**/*", to = "" },
|
|
|
|
|
# The same pattern, but nested under an `AllInOne` prefix.
|
|
|
|
|
{ from = "pattern/with/**/*", to = "AllInOne" },
|
2026-08-03 14:22:56 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[package.metadata.omrf.cmake]
|
2026-08-03 16:05:08 +08:00
|
|
|
# Namespace part of the generated CMake target.
|
|
|
|
|
# This property is optional; it defaults to the name of the target Rust project.
|
2026-08-03 15:15:18 +08:00
|
|
|
namespace_name = "foobar"
|
2026-08-03 16:05:08 +08:00
|
|
|
# Target-name part of the generated CMake target.
|
|
|
|
|
# This property is optional; it defaults to the name of the target Rust project.
|
2026-08-03 15:15:18 +08:00
|
|
|
target_name = "foobar"
|
2026-08-03 14:22:56 +08:00
|
|
|
|
|
|
|
|
[package.metadata.omrf.pkgconfig]
|
2026-08-05 10:45:51 +08:00
|
|
|
# The unique identifier of the package.
|
|
|
|
|
# This property is optional; it defaults to the name of the target Rust project.
|
|
|
|
|
id = "foobar"
|
2026-08-03 16:05:08 +08:00
|
|
|
# Human-readable name of the package.
|
|
|
|
|
# This property is optional; it defaults to the name of the target Rust project.
|
2026-08-03 15:15:18 +08:00
|
|
|
name = "Foo Bar"
|
2026-08-03 16:05:08 +08:00
|
|
|
# Brief description of the package.
|
|
|
|
|
# This property is optional; it defaults to the description of the target Rust project.
|
|
|
|
|
description = "a brown fox jumps over a lazy dog."
|
2026-08-03 14:22:56 +08:00
|
|
|
|
|
|
|
|
```
|
2026-08-03 16:05:08 +08:00
|
|
|
|
|
|
|
|
## Environment Variables
|
|
|
|
|
|
|
|
|
|
- `OMRF_PACKER_CARGO`: Path to the `cargo` executable used to collect project metadata. When unset, the packer invokes `cargo` as resolved from `PATH`.
|