rust-embedded / rust-embedded/meta-rust-bin

Compile with rust TCLIBC different from the project default

Open
#155 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
BitBake
Stars
124
Forks
92
Avg merge
6h 54m
Merged PRs (30d)
2

Description

By default my yocto project use TCLIBC="gnu". However I need to compile fully static rust app using TCLIBC="must"
Is there a way to setup rust toolchain different from (or additional to) the default target TCLIBC?

I soled it introducing RUST_TCLIBC="musl" and patching classes/rust-common.bbclass like this.

-    tclibc = d.getVar("TCLIBC", True)
+    tclibc = d.getVar("RUST_TCLIBC", True)
+    if tclibc == "":
+        tclibc = d.getVar("TCLIBC", True)

Is there a way to do this without patching rust-common.bbclass? Can we introduce RUST_TCLIBC variable to defining TCLIBC for rust?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with classes/rust-common.bbclass and trace how TCLIBC selects the Rust toolchain. Check the reported RUST_TCLIBC fallback behavior and the surrounding Yocto configuration conventions; done means the requested separate Rust libc setting is supported without patching the class and its usage is documented or verified in a Yocto build.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.