Safe Build Guidance #6
Replies: 2 comments
-
Two thoughts:
Moreover, it makes local development a real PITA, as when you're just hacking on changes, having to keep your local fork lint-clean 100% of the time is a real hassle. As per the advice in the link, it'd be better to configure the lints via
I would suggest basing lints off some existing curated lint list (e.g: https://github.com/EmbarkStudios/rust-ecosystem/blob/main/lints.toml), while also fine-tuning it to the specifics of the tpm-rs project |
Beta Was this translation helpful? Give feedback.
-
The difference between
I would suggest
You don't need to write
That would require I'm supportive of adding the I also generally agree with @daprilik on |
Beta Was this translation helpful? Give feedback.
-
Since one of the primary reasons to create a Rust-based TPM implementation is to leverage Rust's safety features, I think it makes sense that we leverage as much error checking as possible in the build.
Thus, I propose the core implementation of tpm-rs be as portable and safe as possible by liberal application of #!deny and clippy.
I look to the real Rust experts to suggest specific
clippy
settings we should adopt, but at least I suggest we start with these:#![forbid(unsafe_code)]
#![deny(warnings)]
#![deny(clippy::all)]
and use
#![no_std]
andno_alloc
as well (thanks @chrisfenner for these suggestions).notes:
#![deny(clippy::all)]
does not enforce every possible warning inclippy
, but just the defaults.#![forbid(warnings)]
to disable re-allowing all warnings by default, so long as it is still possible for a particular bit of code toallow
a particular individual warning if necessary.Any thoughts or objections, anything else?
Beta Was this translation helpful? Give feedback.
All reactions