---
section: 32
x-masysma-name: rust
title: Rust Packages in MDVL
date: 2026/09/26 23:32:35
lang: en-US
author: ["Linux-Fan, Ma_Sys.ma (Ma_Sys.ma@web.de)"]
keywords: ["rust", "mdvl", "kb", "mdvl-meta-rust", "compile", "meta"]
x-masysma-version: 1.0.0
x-masysma-website: https://masysma.net/32/rust.xhtml
x-masysma-repository: https://www.github.com/m7a/lp-meta-rust
x-masysma-owned: 1
x-masysma-copyright: (c) 2026 Ma_Sys.ma <info@masysma.net>.
---
Overview
========

This repository contains a metapackage which defines the dependencies required
to build programs implemented in Rust on MDVL.

Metapackage
===========

The list of dependencies can be found in `build.xml` and the metapackage
`mdvl-meta-rust` itself can be built using

	ant package

Approach to Rust in MDVL
========================

MDVL relies on packages provided by Debian as much as possible.
It does this, too, for Rust. This is nearly impossible in the general case as
Rust programs tend to depend on very recent compiler versions (rustc, cargo) and
on many arbitrary (often: new) versions of libraries which, too, are often not
available in Debian.

Although MDVL is generally based on Debian stable, as of this writing, Debian
testing (Forky) is used to build the Rust packages.

To integrate a Rust program into MDVL, their `Cargo.toml` and code are patched
to change the dependencies to Debian-included variants as far as possible.

Also, in event that a dependency is required but not available in Debian,
custom MDVL packages are provided to import the packages of interest from
`crates.io`.

The MDVL packages for dependencies are created by combining `debcargo` (a tool
from Debian) with the MDVL build system (ant). The official Debian Rust packages
are built from a monorepo. The MDVL packages are offered as individual
repositories, making it possible to re-use most of the build infrastructure
which depends on one `build.xml` per package.

The MDVL packages for programs are created by invoking `cargo` after adding the
following configuration (`.cargo/config.toml`):

	[source]
	
	[source.debian-packages]
	directory = "/usr/share/cargo/registry"
	
	[source.crates-io]
	replace-with = "debian-packages"
	
	[net]
	offline = true

This way, dependencies are (only) resolved from the ones available in the
running Debian system.

List of Rust Dependencies
=========================

You can find the following Rust packages for dependencies in MDVL:

Package                     Repository
--------------------------  ---------------------------------------------
`librust-mlua-dev`          <https://www.github.com/m7a/lp-rust-mlua>
`librust-mlua-sys-dev`      <https://www.github.com/m7a/lp-rust-mlua-sys>
`librust-strum-dev`         <https://www.github.com/m7a/lp-rust-strum>
`librust-strum-macros-dev`  <https://www.github.com/m7a/lp-rust-strum-macros>
