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

Simplify cargo build invocation #33

Closed
chinoto opened this issue Apr 3, 2021 · 3 comments · Fixed by #40
Closed

Simplify cargo build invocation #33

chinoto opened this issue Apr 3, 2021 · 3 comments · Fixed by #40

Comments

@chinoto
Copy link
Contributor

chinoto commented Apr 3, 2021

Right now we essentially have env AVR_CPU_FREQUENCY_HZ=16000000 cargo +nightly build -Z build-std=core --target avr-atmega328p.json --release, which is fairly long.

Maybe it is better that users have to type in the target and build-std flags so they become aware of their necessity, but otherwise they could be omitted with the use of .cargo/config.toml. Perhaps a note about them in the README would be enough?

[build]
target = "avr-atmega328p.json"

[unstable]
build-std = ["core"]

# Cargo versions before 2021-02-23 won't recognize this: https://github.com/rust-lang/cargo/pull/9175
[env]
AVR_CPU_FREQUENCY_HZ = 16000000

At which point the command is simply cargo +nightly build --release (once the LLVM error is resolved and the user has a new enough cargo). We don't even need +nightly if ./rust-toolchain is added.

@stappersg
Copy link
Member

Looks good to me (and I agree on someone will someday provide a merge request).

@chinoto
Copy link
Contributor Author

chinoto commented Jun 6, 2022

I suppose I should have started it out as a pull request instead of an issue.

@stappersg
Copy link
Member

Now we have #41 and would to know on which platform it works. ( I'm on Debian with rustup updated. )

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 a pull request may close this issue.

2 participants