rust-embedded / rust-embedded/svd2rust

Output Cargo.toml dependencies and features

Open
#780 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
857
Forks
164
PR merge metrics
No merged PRs in 30d

Description

Should we have a way to make svd2rust output a [dependencies] and [features] given a set of arguments?

svd2rust cargo-toml --impl-defmt defmt -i STM32F30x.svd

would give

[dependencies]
critical-section = { version = "1.0", optional = true }
cortex-m = "0.7"
cortex-m-rt = { version = "0.7", optional = true }
vcell = "0.1"
defmt = { version = "0.3", optional = true }


[features]
rt = ["cortex-m-rt/device"]
defmt = ["dep:defmt"]

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 by reviewing the svd2rust CLI entry point and how arguments such as --impl-defmt are currently handled. Define the cargo-toml command around the requested STM32F30x.svd example, and consider the work complete when it emits matching [dependencies] and [features] sections for the selected arguments.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.