From mboxrd@z Thu Jan 1 00:00:00 1970 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:11 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-vs1-f63.google.com (mail-vs1-f63.google.com [209.85.217.63]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 63GFNApw031919 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 16 Apr 2026 17:23:10 +0200 Received: by mail-vs1-f63.google.com with SMTP id ada2fe7eead31-6104087f037sf2735371137.0 for ; Thu, 16 Apr 2026 08:23:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1776352982; cv=pass; d=google.com; s=arc-20240605; b=HnROuGkO6oK+v95wJRWVsIv24XKmQ22Ai+SRk/XqiRbs8gt0x1btoIKFTvpkE6cKDQ RTVMwep3QN2trfSKfUw9suustDrOQOvx4qinZvZSo8/zL7LTRGVY3XxLgi1KHVgxHlV3 qrlSrak+XzPm04KAeAMmlQvTfJV/qiV84V1aA4Mt+s8fH66OTunJtPKO5X6t8RdUXMpT QcCT/gbzJS18X/ZzJafzwhrbRUyS0XT/+ncuGCWWooz8oKZrpYGlhk/an2LuyRBUGt92 WFlVLQwUt2Kqbdj0RJX03m6MXK3FPRzM2/pXRfAbbvn4zz4NVe2m9M3tGFxzBS+UyC4g VtTw== 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=1vEH9xJBHeituh3k8xEKFdXZOnPYBTTG9QOiQ/A+E5Y=; b=ddr+5L2MapemrBKR+AXa9/27ruuN0U7osv8akTVMrm0RCFgZyrdQesuD5UmN9n0R9Y ctG5nLIwVB4w+bVtFc1mpskX/FmhpbFMOtE0MIyA+ugRY/RaqQS5rTNMv3OWMpEJWXA1 XLzzRsr3oEzTaCcGpwSWAXutpfFxzlGVycweIoyntK/CIHOSdkZWL/y9bcpFHLJeM9s/ MbvCdI6NJ2iK4zlq0cFhTS9/4Aq4RayuuE6pB7rfleWCdgKXhbAoERCs/zJpfAa6e7Q5 GomhYDNhdqY2LvKvYugd7+DDpT+rgusDw73Tvh1fxt052xCWdHj6Jw7iPV4rrmlPDQFT WuvA==; darn=ilbers.de 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=ilbers.de; 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=dN9UoYvY0SL6TSP7u2qo0ELmSbQu9OQxfVaTKopVI2WmTvTANan1wIn/jaFNzPs5bB 6Y2rBq8JDFmgTQxrVRfLZN4Y5lQEg3wqxRx9AEMRMzGT0E9UsgBa9QAfcKuaZzAJj2U9 tdOwGghE5icrRych+05xYSfnKemU71BXJJv+8Yr0eLTo0j5CZ7z+nFwFRfnYwmReEZI/ 1sXycCCTiV+kQEYtO6DLoRlV9tXLEoxkzviKcMxXTKUvXFTH5olj9l6ysKM4sQ2WLWKt QyZHm3N4EXRhK+Jdat4jqybNVd+FFZwkEOB+unAZOiiCrOx3eoVg1jHDnAYEPHq80hQZ 9kzg== 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=r2f6oBm2IP/qydxBQARoUxWhZrbc7puqO3sQuWINcqZEpCcfuA7DBRYpGzDs66cjpi G0TrtCeehiY590L82J/TuTCbH4VKFYIJFCwAChsGy3kqtmUGTOboXduH9TNSjCjWQU3F VSrWqumjrkypNzEYnQURHbk8Ghxh5N0fcYPFBi1WGvKuP55aGmb9ZV7BGrAw3VhuxQ4z bBAnW6owopiYSo7z154VfMvNNNUBcVvMvL277gH2pRes/cA44JNa98EqkazCYS5x0gNu tLaBnI063jvOufd6dPnJB0zHuT8it+Si+qiQVU7hc19FgbgStH06X+e9TiKiuNhcGBHq h8cQ== X-Forwarded-Encrypted: i=2; AFNElJ9Vt0YGFHjjCYqwbA+wD35Nomg8BNouOX/w9SMSbOFDRgfMSo3GF24sugWi3A19HqGAAKk7@ilbers.de X-Gm-Message-State: AOJu0YzYh4Hpxg8v73vWRq8shbacuxul1sLqWMVIF8zbxl1Is5NRqRb9 gv6BaLFdtK6u5c4DpImLooET+PT3jG6Z1RYx4Fgi3iHi29jNyR4qQMIC 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 From: "'Quirin Gylstorff' via isar-users" 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 Content-Type: text/plain; charset="UTF-8" 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_MSPIKE_H2,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-TUID: 8IXEIIzrpXef 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 -- 2.53.0 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/20260416152238.1651692-4-Quirin.Gylstorff%40siemens.com.