-.\" $OpenBSD: cargo-module.5,v 1.7 2023/08/18 08:22:29 tb Exp $
+.\" $OpenBSD: cargo-module.5,v 1.8 2024/01/01 14:16:59 semarie Exp $
.\"
.\" Copyright (c) 2008 Marc Espie
.\" Copyright (c) 2017 Daniel Jakots
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: August 18 2023 $
+.Dd $Mdocdate: January 1 2024 $
.Dt CARGO-MODULE 5
.Os
.Sh NAME
.Pp
Automates download and compilation of dependencies of a Rust project using
.Xr cargo 1 .
+.Pp
During
.Cm fetch ,
static dependencies ("crates") listed in
.Ev MODCARGO_DIST_SUBDIR
as
.Ev DIST_SUBDIR .
+.Pp
During
.Cm post-extract ,
crates defined in
are moved to the
.Ev MODCARGO_VENDOR_DIR
directory.
+.Pp
During
.Cm post-patch ,
crate-metadata are generated using
.Pa devel/cargo-generate-vendor .
+.Pp
With
.Ev CONFIGURE_STYLE
set to
Finally, any crates listed in
.Ev MODCARGO_CRATES_UPDATE
are updated.
+.Pp
.Ev MODCARGO_RUSTFLAGS
can be used to pass custom flags to all
.Xr rustc 1
invocations.
.Pp
-.Pa lang/rust ,
-.Pa devel/cargo
+.Pa lang/rust
+is added to
+.Ev MODULES ,
and
.Pa devel/cargo-generate-vendor
-are added to
+is added to
.Ev BUILD_DEPENDS .
-By default
-.Ev MASTER_SITES9
-is used to download the crates.
.Pp
This module defines:
.Bl -tag -width MODCARGO_INSTALL_TARGET_PATH
Architecture-specific
.Ev WANTLIB
entries required by all Rust code.
-Should be used instead of explicit entries for
-.Dq c ,
-.Dq pthread ,
-and
-.Dq c++abi .
+It is a copy of
+.Ev MODRUST_WANTLIB
+provided for simplicity.
.El
.Pp
This module adds three
-.\" $OpenBSD: port-modules.5,v 1.266 2023/09/14 03:53:26 bentley Exp $
+.\" $OpenBSD: port-modules.5,v 1.267 2024/01/01 14:16:59 semarie Exp $
.\"
.\" Copyright (c) 2008 Marc Espie
.\"
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: September 14 2023 $
+.Dd $Mdocdate: January 1 2024 $
.Dt PORT-MODULES 5
.Os
.Sh NAME
.It lang/ruby
See
.Xr ruby-module 5 .
+.It lang/rust
+Ports using Rust must use this module so a rebuild can be triggered via
+.Ev SYSTEM_VERSION-rust
+on updates of the lang/rust port or changes to the Rust standard library.
+Sets
+.Ev MODRUST_WANTLIB
+as appropriate for the architecture so it can be added to
+.Ev WANTLIB .
+It adds lang/rust to the
+.Ev BUILD_DEPENDS
+unless
+.Ev MODRUST_BUILDDEP
+is set to anything but
+.Dq yes .
.It lang/tcl
Sets
.Ev MODTCL_VERSION ,