mbox series

[RFC,0/3] Add helper and documentation for rust packaging

Message ID 20260323105332.2721282-1-Quirin.Gylstorff@siemens.com
Headers show
Series Add helper and documentation for rust packaging | expand

Message

Quirin Gylstorff March 23, 2026, 10:52 a.m. UTC
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>


This adds based on https://rust-team.pages.debian.net/book/ some
documentation add a generator to package rust crates.

The generator is the same as used by Debian but we don't use the
approach from debcargo-conf as `debcargo cargo` executes the following
steps add once:
- fetch source
- generate orig tarball
- generate debian folder

As this is not compatible with the concepts of bitbake recipes we use
the http fetcher and the by `debcargo` generated debian folder. This
approach is intended to build crates stored in a registry(e.g. crates.io).

The crates package generated by this script should be package upstream
to avoid maintaining them forever.

Crates not in a registry need to manually packaged.

Quirin Gylstorff (3):
  Add script to generate a recipe for cargo.io crates
  Add example of a rust hello world as isar recipe
  user_manual: add rust section

 doc/user_manual.md                            | 66 ++++++++++++++
 .../recipes-app/rust-hello-isar/files/rules   | 27 ++++++
 .../files/rust-hello-isar/Cargo.toml          |  6 ++
 .../files/rust-hello-isar/src/main.rs         |  3 +
 .../rust-hello-isar/rust-hello-isar_0.1.bb    | 22 +++++
 scripts/generate_cargo_crate.sh               | 85 +++++++++++++++++++
 6 files changed, 209 insertions(+)
 create mode 100755 meta-isar/recipes-app/rust-hello-isar/files/rules
 create mode 100644 meta-isar/recipes-app/rust-hello-isar/files/rust-hello-isar/Cargo.toml
 create mode 100644 meta-isar/recipes-app/rust-hello-isar/files/rust-hello-isar/src/main.rs
 create mode 100644 meta-isar/recipes-app/rust-hello-isar/rust-hello-isar_0.1.bb
 create mode 100755 scripts/generate_cargo_crate.sh