Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add include-compatible config flag #779

Merged
merged 2 commits into from
Nov 29, 2023
Merged

Add include-compatible config flag #779

merged 2 commits into from
Nov 29, 2023

Conversation

Shatur
Copy link
Contributor

@Shatur Shatur commented Nov 29, 2023

When developing FPGA, code needs to be generated dynamically. Idiomatic way of doing it is using include! macro: https://doc.rust-lang.org/cargo/reference/build-script-examples.html#code-generation
But top-level attributes can't be used with it:
rust-lang/rfcs#752
So I added a config flag that disables generation of all top-level attributes.

When developing FPGA, code needs to be generated dynamically.
Idiomatic way of doing it is using `include!` macro:
https://doc.rust-lang.org/cargo/reference/build-script-examples.html#code-generation
But top-level attributes can't be used with it:
rust-lang/rfcs#752
So I added a config flag that disables generation of all top-level attributes.
@Shatur Shatur requested a review from a team as a code owner November 29, 2023 15:03
@burrbull
Copy link
Member

burrbull commented Nov 29, 2023

I'm fine with adding flag, but I don't like flag name.

cc @Emilgardis

@Shatur
Copy link
Contributor Author

Shatur commented Nov 29, 2023

What flag name would you suggest?

src/config.rs Outdated Show resolved Hide resolved
@burrbull burrbull added this pull request to the merge queue Nov 29, 2023
Merged via the queue into rust-embedded:master with commit 99e68c7 Nov 29, 2023
43 checks passed
@Shatur Shatur deleted the include-compatible branch November 29, 2023 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants