rust-embedded / rust-embedded/meta-rust-bin
Working with CMake project that uses cargo
Nobody has claimed this yet.
- Dominant language
- BitBake
- Stars
- 124
- Forks
- 92
- Avg merge
- 6h 54m
- Merged PRs (30d)
- 2
Description
I'm working on creating a recipe that builds a C interop library for a rust based project zenoh-c.
The recommended method for building and installing the library is to use CMake which uses cargo to build the .so file and then uses standard CMake idioms to install the library, headers, pkgconfig, and CMake configuration files.
It seems that I can use cargo_bin to build the .so file without much problem but I'm at a bit of a loss on how to make the CMake specific stuff work. I also tried using snippets of code from cargo_bin.bbclass in my recipe to configure the environment to allow CMake to drive the cargo build for the target but it's not quite working like I'd expect.
I'm wondering if anyone can make any recommendations the best way to go here.
I'm also wondering if maybe the code in cargo_bin.bbclass that configures the environment, scripts, etc can be broken out into a separate class that recipes that don't want to call cargo build directly can use. The cargo_bin.bbclass would obviously use this new class.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading cargo_bin.bbclass and the zenoh-c CMake build and install flow described in the issue; compare its cargo-driven environment with the existing recipe approach. Determine whether the shared setup belongs in a separate class, and validate completion by building and installing the library, headers, pkg-config data, and CMake configuration files through the recipe.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, rust
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100