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; Mon, 23 Mar 2026 11:53:51 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f61.google.com (mail-wm1-f61.google.com [209.85.128.61]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 62NArpEP030986 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 23 Mar 2026 11:53:51 +0100 Received: by mail-wm1-f61.google.com with SMTP id 5b1f17b1804b1-48704f66776sf5991265e9.1 for ; Mon, 23 Mar 2026 03:53:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1774263225; cv=pass; d=google.com; s=arc-20240605; b=iCUsSH/3cm33IVIZ+hkSjqfz2KSgZ7ky2E91mKyJefgzm3lYYKgLlKbzgzkaikP2LW Zgs+JO88mdtzhfnE5DhPKiZ/xayN0TQWQsx9/etVK0H10Iww/lASy8jgPA/fg5Jg20JK gC3bb99iIXJwHHw0eEAkLVqN88USL2YlNMGgk2YYz9UfoEWISHaNx/v2P7JKBGFkeFDU zoVJGxafv0vbX67tfANgKFsxLmFy7fiS6Fb/jMOFdj41CqyWDjxNaiqYuNsegTlPW+JA iYSo9s3FXEZxgOJeR5fpmWfGtYIpEvnyNtXIEtX91NQQots+/JT+Bd7pTGLYxR6KDbub VQYA== 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=liLVvEMsKaBFQzWkCS4fO8CbkAvd6Znvqgx/kf5zrn4=; fh=ZaalrO1RpStMBHwO9nPLiybvyLsNwdExSCUDhw+4U+c=; b=Gr4zFqE/n19qayw1yhL1D6brY8Lg0Yx0gX2PQH1AJoJ7Qvu2srilJrMphunKVwSHvO jLvHUgDTzC0CeXI+LAO5rmZdcHwz43aeL46SrnqjJFiic5Or59VOqnYg+1FoyH1+Z3Wf VHKMMCRgfxFp7ebBSTD8Qo/KnC4ZaflvC0A6Dl7x8YE0+PioUbAUXBwZDZkFiTBjB4sH Fy9dzXkgsgS3EUwGba4bVV+5a+fY4REh/e0dkYr/irsWBQ6BNd5N1AbRndon99einuhR HhCa4GJnvGwGcRWzjQaBtDLis3O4bC+KVUZlDZxQ+eKNTmK8P7GSfYNbHwMN0OIv84Y9 I4Ig==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=B+2kFMFJ; spf=pass (google.com: domain of fm-51332-202603231053424c47bd1a5900020784-ofhexo@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-51332-202603231053424c47bd1a5900020784-ofHeXO@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=1774263225; x=1774868025; 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=liLVvEMsKaBFQzWkCS4fO8CbkAvd6Znvqgx/kf5zrn4=; b=nl4KV/pIFYKidanGsiXHwu4Ck3QPFnvr9GkOh/sgG3tfqitE9zPYfHlVyW5qv39BDL QBznVKnQ4Yr5JTExbtcljtEm0U4ZxAt5EBfFJ++0avEdbpwwQhAOOVsZZcVXTy5xlmyu 4vRb5Ac1IM1ra0hE1OqxTo/X9u8rG1pp5Lqbyaggct97Ce7BnMegV1bb1ZDITNflxY+S j7ArT7YsnAhk8gwd++GWycukNwzkXrzTf4DUuiVXK71kDU5XWfw8tVxA5ygVMxhTHsxF ronpaoKpQMdqSk3KZ5bPVoyDmXzQcr7q2yw8O0p7//cMGLFURzRUzU29vQHFnJxrJXJM Zbtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774263225; x=1774868025; 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=liLVvEMsKaBFQzWkCS4fO8CbkAvd6Znvqgx/kf5zrn4=; b=hM3w5K9EyCMY6r0dXAGhakZhrwar0CBKotzo6APPRD+u1M4duSM1rpwDB8ss+eYVIg DazuQb24PORBDd/M4K13Ukge8yhP14b4kmk92wdPbpMo938ksIEBZIdYdbwd9buZ5QoY pKkEn9OidgDg+rFhFMgu2Z3x4mcePjUxBvM18ArtZcfw5LMiIrX6VzFHPooLNbWnWuJN fpdH6biduyM8YKP5wXzjwhW7TpMoGazmUwMKl8YZOepASnckS299c9TvmB9Quq2huYos NdDuIeCtrzsLyJ0/9hdxjZu8pjCz6EGxbM+Py1PxvyDP3zGtxg/5fy2kh37L3dxUpqsf Wfjw== X-Forwarded-Encrypted: i=2; AJvYcCXIECqyiPqF9lYgCAvooM9SMzbDlA/BLyfOsvlinbUTMfIgik9JG0WnC4LpYHPO9WVyJpe7@ilbers.de X-Gm-Message-State: AOJu0YyI3/QiNS1V8iUUgq+jNdKOVpqVZJS2O4Vt+F2F3kQ/rPDxKjDL N85Yw2cSlIRzmYRQ1Mb+MbipFKs8zXap/KtDNvoFsp1YKk0+pXrSC3RV X-Received: by 2002:a05:600c:3b07:b0:486:af22:4a2a with SMTP id 5b1f17b1804b1-486febbc445mr162998115e9.7.1774263224820; Mon, 23 Mar 2026 03:53:44 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="AV1CL+H1FBMjFJ3GpTuE38XbHw26VM7HwIKdVLbGyRf0gI1m5g==" Received: by 2002:a05:600c:4f42:b0:485:f1d6:2b15 with SMTP id 5b1f17b1804b1-486f93a7e6dls33540385e9.1.-pod-prod-04-eu; Mon, 23 Mar 2026 03:53:42 -0700 (PDT) X-Received: by 2002:a05:600c:3b07:b0:485:3193:6ddb with SMTP id 5b1f17b1804b1-486febbc65emr162585925e9.3.1774263222493; Mon, 23 Mar 2026 03:53:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774263222; cv=none; d=google.com; s=arc-20240605; b=WZAJYNHBTPcV0KgeBpJ/7p0UeiOe6uV2tw4xmuFpc0NZB2tX7fX1fjQHXC1yUozi2x 9fccKtZPivvWiF+AzXBvq0prPlUsCTZyTc1On+S3AyYhk5WIna6qkMQ4eZAttVx4hDJ7 d8OP1BtOGI+EBVku1R9Wkxo51NksPnJpOww/JEGvlLaKw2ZqsJ3JYhP9i+lfZWBnMhoe xCgQ86Gy+cwRmar0mW513GczSPvDYZ8nTx9ooJpEjRLbX+xYraFvpaksNlztru/05ojY KFLMtP9rSbdfpL6xIdandvq5U1JhXBXh5my2dOBDDom8N/Cj8SjNRL7fINs9ycJgommX 3iKA== 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=bem2UvfQJxgxc4bTuU7Yg1BJpi8lDGJ5SOrRZvXIfwk=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=IrwN4rw7mKoAgBfLcGgF9ze0BsQOXfyWgkzWgXxuD8YZO3hSQhXqpn0F9MoPctVNzo cFgOSoe5DUYAKQsWXFF3Y2RCQxfVEeqAgp1fFCIC7sNozbRe8ULvb0r8DJ4t4HOpsS0k xK4RM78ow+5/+5mDlUHgGejaoOYtZLGKcTmU44j3gSJ8++VgJlSJ9pu88BfK3/qVXUxo /qkNUr9ljQtA9aZ7i3cyZbO0mgKlxu47x3ugKVEdsDapRlb8luhWH5DtLDZV2CPXMv4Y 2okwJrbRzVTIme1LqW/I+hv+7r7vnA+WCXMCboYFtRRe5QAm3M2xuAiALQIikQmAkc4q Pwkw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=B+2kFMFJ; spf=pass (google.com: domain of fm-51332-202603231053424c47bd1a5900020784-ofhexo@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-51332-202603231053424c47bd1a5900020784-ofHeXO@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-227.siemens.flowmailer.net (mta-64-227.siemens.flowmailer.net. [185.136.64.227]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-486fe861d95si655545e9.1.2026.03.23.03.53.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Mar 2026 03:53:42 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-51332-202603231053424c47bd1a5900020784-ofhexo@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) client-ip=185.136.64.227; Received: by mta-64-227.siemens.flowmailer.net with ESMTPSA id 202603231053424c47bd1a5900020784 for ; Mon, 23 Mar 2026 11:53:42 +0100 From: "'Quirin Gylstorff' via isar-users" To: isar-users@googlegroups.com Subject: [RFC PATCH 3/3] user_manual: add rust section Date: Mon, 23 Mar 2026 11:52:30 +0100 Message-ID: <20260323105332.2721282-4-Quirin.Gylstorff@siemens.com> In-Reply-To: <20260323105332.2721282-1-Quirin.Gylstorff@siemens.com> References: <20260323105332.2721282-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=fm1 header.b=B+2kFMFJ; spf=pass (google.com: domain of fm-51332-202603231053424c47bd1a5900020784-ofhexo@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-51332-202603231053424c47bd1a5900020784-ofHeXO@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: W0u4f/GKmCvf From: Quirin Gylstorff Signed-off-by: Quirin Gylstorff --- doc/user_manual.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/doc/user_manual.md b/doc/user_manual.md index 7520854b..75f72355 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,71 @@ 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/`. + +--- + ## 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/20260323105332.2721282-4-Quirin.Gylstorff%40siemens.com.