From patchwork Thu Apr 16 15:22:31 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quirin Gylstorff X-Patchwork-Id: 5037 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 16 Apr 2026 17:23:10 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-vs1-f64.google.com (mail-vs1-f64.google.com [209.85.217.64]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 63GFN8fh031905 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 16 Apr 2026 17:23:09 +0200 Received: by mail-vs1-f64.google.com with SMTP id ada2fe7eead31-611af0d600bsf1971557137.2 for ; Thu, 16 Apr 2026 08:23:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1776352982; cv=pass; d=google.com; s=arc-20240605; b=kDi9ldYlr8B8LvJ/K71h5lXWHROXHW+24u7zdawiKYaVuUSUKmY0o+KfQcQkDXzDrM 4W+j1COHzHs0rFfBo+U6hHSAOAa5IchJ3FpK75JkCiP3xHghhGmr9OsNxdJ8163TqJFJ lKHMDWzi8SJzFG3rSuec8lZFojw1AmxiskhjOuTImo2uJj0cdfESfuf8ZG8wukF5BrM5 36/fCNhq7KR13Mlyy6N3pXViB6uXSrysDGdygKSJu+3YWGw/LitJsHnxHF54rk/UiE6g DUJZQIGcBpZ7akwovuRG9JJKYoI4oy+gGamYf0n+LH2eYIBkTaDh4jsNntTn5sEngobr RYzA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=eY0AJj5Rqt2douaF4+AleWr+6eUoFTsjqqFfB0uzs+4=; fh=RP/gwBLDttVyENxYLdihpPUZa8Of/OMFJsJa7ZMTTLM=; b=Z+6cHmUvUUZB6hIVMJQPi5UD3QGFkDY4jfaw/P4N8uuGkwv0hKWvuhcq/y36+QtW6c bNPZWCCIcxeL9fEQ4mOn52LyW8AeJ8gVwleLx6g1UiSBoR2wLdUycxdxQD2NAMk9Jjg+ UUc+/qyu2PI7o9Q/LKgyyU938QJ8DBPLBOXjlnLEg4v8IPR5sHnIxaPsV2mlFWvlV2lX StBYuldsyCBjWpg5hvm8zIabCvEfVejYzcuuUOlhOVPTPnKqnYxiXdidSKgr7Fv5gvaI hBKfym8+9xNhdFdsNhO/d+ojCiXO+VN9keoj6OyAyW6zSeI3FoeWmjPb30Mh5SAtNpjC WAnA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=S+hwoWbK; spf=pass (google.com: domain of fm-51332-20260416152259912f91dccd0002074a-qxg0ca@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-51332-20260416152259912f91dccd0002074a-Qxg0Ca@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20251104; t=1776352982; x=1776957782; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:to:from :from:to:cc:subject:date:message-id:reply-to; bh=eY0AJj5Rqt2douaF4+AleWr+6eUoFTsjqqFfB0uzs+4=; b=kEt/9uzgSug+viLHkpMBxP7sarpzpYLqLny4LOTf/TT2nEfytjwRjgY+VgSg9ZkB0j ZyQZrBoI7wi34leRWMVTpz+hJNPMETt79tQJPEJhGzyQHVfx1bDIIj8MVzXOYtq3Wqsy 4vmGtQUZYfiMIRZ34wraEhZ3n9Cy/n1XV3JpQPiPH55AjFtg/CddAWbWrVMG/9MwYJpo 233p/nbFDalaUnlO3MuhOqTn9XJ07TJybOesPLa7x9O8b4Cc+2/Sgd5tLNG/LNh2dLk9 Xfj8kr+VVG4tSEp+u1dQqLDVn5a983xj6RROZQe0U5iQRsWb/xFuTpc0WLzregB/xxP6 f0xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776352982; x=1776957782; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eY0AJj5Rqt2douaF4+AleWr+6eUoFTsjqqFfB0uzs+4=; b=LVDMPhXB0BV35efLT2LkEcD6QKVwd/Bh4reXWIoyn1BAFtUz3nDAipNfMlB8O7Wx2a hGcd5PwnG9iplSdyWEdjbAW3XPghKzPiShjU9Q7yJ2vLN70RX7XRraMClhQFbQMsXuFP KTHZngnle1oJ0qtveSIq59+ywect6KqvfTG8/JslL1+kP3n3/nOA9cRW6rkF2SK3QkWy DXUDol/yvWYVzDP0FV3RJFzA48z/u2b5djw5np3iqzBmW9NvyGX0yBL2LqOCSTSsioMQ YWkgfSxe9CMTfCXwaRwK2VF7mxppgnvgUDafqU5aOw80+Au+hjdxM2E9YiQUMW8n7ivo X1JA== X-Forwarded-Encrypted: i=2; AFNElJ/IKllj89UA1HlrTICLdMQbLVF8AqTJdaFO+z4nqNvzElwTWlirOgRsjp6lXxDbW0a4yRbhs0c=@isar-build.org X-Gm-Message-State: AOJu0Yx8+3hvQgrx8b32sodM5hDNFbZQ10B1+9vOXqIdE6pDwwazHAVh bK84N2yJ5ToX73xTTiB0f0FMIx4Dz0ZM37XHRnKA1oE2yE5WgRdCvSt+ X-Received: by 2002:a05:6102:161e:b0:605:889a:89a1 with SMTP id ada2fe7eead31-60a00a2ea6cmr11884425137.23.1776352982497; Thu, 16 Apr 2026 08:23:02 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="AYAyTiLFfmcfOaox7Fw3QeQ2PYd9XFgFE6IEgghWLmnmKoPs4Q==" Received: by 2002:a05:6214:1bce:b0:8a1:212c:e4a2 with SMTP id 6a1803df08f44-8ae8208dd40ls27845906d6.1.-pod-prod-06-us; Thu, 16 Apr 2026 08:23:01 -0700 (PDT) X-Received: by 2002:a05:6102:3e92:b0:609:5643:e9f2 with SMTP id ada2fe7eead31-609fe5840dfmr12816138137.6.1776352981253; Thu, 16 Apr 2026 08:23:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776352981; cv=none; d=google.com; s=arc-20240605; b=gwNN9B7e1wyLM32ecrj3XThh7RBOatOMhXL9fp/P3OGQOtAaA+jFliZFLdeKzt/yZ8 /YSeGmOjBLP69nhfL3CC4OBVzq67BSDste2hP0Y0Zvtl131fpA//zogfEBAeTCETKSej DWU4C0WGiwWXMf8t3yOoSPLu6jBP3R/7HRNUb+hJbgJl1q8SprxYTcYZx1Gqsnjdw1JF 2Pzby93PK0HWhlaqwL5MAiWCqq4ZvSJm7pcxnuVFvefxQkpOZpBiatopk1T3j10NxQVV YAVropaArU0hTIe6TfodVCKMCvhZVdUyfjL2xlpe/cKP5e2kghpqkBRkdeOuUdzzoAnZ h+4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:to:from:dkim-signature; bh=n7FMpE3yFPuX8YdSC47V0rhja/TXxR9NmC1bURM/tm4=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=hr2y6HhWyDstlNUi1GX64nVKzlqYzq99ukj/CGMdcj/W2rUDIltV3KUJ+9Fr6nv0NO DF+o0+hfI58G2Isqeh6tKQ1WATuK5MR4eOQJ59DSkxNrXFn6n4UA2FOkz9o47Y6YEnv9 Qn6DR5etL0/rzQVnDA/OXbFZwrsxjf26GUkAytnPM2BgiXTLaa2HZGABi0D/wh3IqjTh rbZm5lctis96DXU+HhN24/XnWu9e1orXF18WYaAzWPs5+L+e0CWQUWkZjkO/sCILugz0 +Okxcqtrb6MeZblCEvBcV+75iuZYIAOzpNAKyEM6uHEVLP2yKxewPENoY656fCPXsbHC 6c8Q==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=S+hwoWbK; spf=pass (google.com: domain of fm-51332-20260416152259912f91dccd0002074a-qxg0ca@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-51332-20260416152259912f91dccd0002074a-Qxg0Ca@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net. [185.136.65.226]) by gmr-mx.google.com with ESMTPS id ada2fe7eead31-61675257cf6si5646137.1.2026.04.16.08.23.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Apr 2026 08:23:01 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-51332-20260416152259912f91dccd0002074a-qxg0ca@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) client-ip=185.136.65.226; Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 20260416152259912f91dccd0002074a for ; Thu, 16 Apr 2026 17:22:59 +0200 X-Patchwork-Original-From: "'Quirin Gylstorff' via isar-users" From: Quirin Gylstorff To: isar-users@googlegroups.com Subject: [PATCH v3 3/3] user_manual: add rust section Date: Thu, 16 Apr 2026 17:22:31 +0200 Message-ID: <20260416152238.1651692-4-Quirin.Gylstorff@siemens.com> In-Reply-To: <20260416152238.1651692-1-Quirin.Gylstorff@siemens.com> References: <20260416152238.1651692-1-Quirin.Gylstorff@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-51332:519-21489:flowmailer X-Original-Sender: quirin.gylstorff@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=S+hwoWbK; spf=pass (google.com: domain of fm-51332-20260416152259912f91dccd0002074a-qxg0ca@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-51332-20260416152259912f91dccd0002074a-Qxg0Ca@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Quirin Gylstorff Reply-To: Quirin Gylstorff Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL, RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Quirin Gylstorff Signed-off-by: Quirin Gylstorff --- doc/user_manual.md | 68 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/doc/user_manual.md b/doc/user_manual.md index 69e8dfef..396e1b90 100644 --- a/doc/user_manual.md +++ b/doc/user_manual.md @@ -20,6 +20,7 @@ Copyright (C) 2016-2019, ilbers GmbH - [Customize and configure image](#customize-and-configure-image) - [Create a Custom Image Recipe](#create-a-custom-image-recipe) - [Add a Custom Application](#add-a-custom-application) + - [Rust in Isar Builds](#rust-in-isar-builds) - [Build statistics collection](#build-statistics-collection) - [Isar Cross-compilation](#isar-cross-compilation) - [Examining and debugging package generation inside their schroot rootfs](#examining-and-debugging-package-generation-inside-their-schroot-rootfs) @@ -1039,6 +1040,73 @@ be installed via `IMAGE_INSTALL`. Have a look at `prebuilt-deb`. --- +## Rust in Isar Builds + +This is a collection of recipes and links on how to +package rust crates. + +This document takes most of its input from https://rust-team.pages.debian.net/book +which contains the practices of the Debian rust team. + +### Crates on crates.io + +We provide a generator in `scripts/generate_cargo_crate.sh` which +generates the scaffold for these crates. This follows more or less +the approach of Debian with https://salsa.debian.org/rust-team/debcargo-conf. + +The user steps necessary are the following: + +1. Generate the package by calling: +`scripts/generate_cargo_crate.sh [CRATE_VERSION]`. + +2. Patch to build with the current Debian release, e.g. relax the dependencies +in `Cargo.toml` + + +### Crates not on crates.io + +There is currently no generator and it is recommended to follow the traditional +packaging approach, see also https://rust-team.pages.debian.net/book/process-workspace.html#general-setup. + +A working rules file could look like this: +``` +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/default.mk +include /usr/share/rustc/architecture.mk +export DEB_HOST_RUST_TYPE +export PATH:=/usr/share/cargo/bin:$(PATH) +export CARGO=/usr/share/cargo/bin/cargo +export CARGO_HOME=$(CURDIR)/debian/cargo_home +export CARGO_REGISTRY=$(CURDIR)/debian/cargo_registry +export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM) + +%: + dh $@ --buildsystem=cargo + +execute_after_dh_auto_clean: + $(CARGO) clean + rm -rf $(CARGO_HOME) + rm -rf $(CARGO_REGISTRY) + rm -f debian/cargo-checksum.json + +execute_before_dh_auto_configure: + $(CARGO) prepare-debian $(CARGO_REGISTRY) --link-from-system + rm -f Cargo.lock + touch debian/cargo-checksum.json + +``` +This example works for a cargo application and cannot be reused by other components +as the file `debian/cargo-checksum.json` is empty. + +An example for the initial cargo crate can be found at `meta-isar/recipes-app/rust-hello-isar/`. + +Check which packages are already part of Debian by using the tool `cargo-debstatus`. + +--- + ## Build statistics collection While Isar is building the system, build statistics is collected in