| CARGO-MODULE(5) | File Formats Manual | CARGO-MODULE(5) |
cargo-module —
devel/cargo port module
This manual page documents the behavior of setting
MODULES=devel/cargo in the
ports(7) tree.
Automates download and compilation of dependencies of a Rust project using cargo(1).
During fetch, static dependencies
("crates") listed in MODCARGO_CRATES are
downloaded using MODCARGO_DIST_SUBDIR as
DIST_SUBDIR.
During post-extract, crates defined in
MODCARGO_CRATES are moved to the
MODCARGO_VENDOR_DIR directory.
During post-patch, crate-metadata are
generated using devel/cargo-generate-vendor.
With CONFIGURE_STYLE set to
‘cargo’, cargo is configured to use
MODCARGO_VENDOR_DIR instead of the standard
crates-io network source. Finally, any crates listed in
MODCARGO_CRATES_UPDATE are updated.
MODCARGO_RUSTFLAGS can be used to pass
custom flags to all rustc(1)
invocations.
lang/rust is added to
MODULES, and
devel/cargo-generate-vendor is added to
BUILD_DEPENDS.
This module defines:
MODCARGO_CARGOTOMLMODCARGO_CARGOLOCKmodcargo-gen-crates target. Defaults to
${MODCARGO_CARGOTOML:toml=lock}.MODCARGO_CRATESMODCARGO_CRATES_UPDATEMODCARGO_FEATURESMODCARGO_INSTALL_TARGET_PATHScargo install instead of
.. Needs to be set for some virtual
manifests.MODCARGO_VENDOR_DIRMODCARGO_WANTLIBWANTLIB entries required by
all Rust code. It is a copy of MODRUST_WANTLIB
provided for simplicity.This module adds three make(1) targets:
modcargo-metadatamodcargo-gen-cratesMODCARGO_CRATES list from Cargo.lock
(a preliminary crates list is not required).modcargo-gen-crates-licensesMODCARGO_CRATES list with license
information from crates present in the
MODCARGO_VENDOR_DIR directory.| January 13, 2025 | openbsd |