Hacker GitHub

← All repos

geiger-rs/cargo-geiger

View on GitHub ↗ ★ 1,664 Rust

Detects usage of unsafe Rust in a Rust crate and its dependencies.

15 mentions on Hacker News by 13 people: 2 stories, 13 comments · first 2020-06-13 · latest 2026-06-20

Mentions per year 15 mentions · busiest year 2020 (3)
20082026
  1. No, but you can use cargo-geiger[1] or siderophile[2] for that. [1]: https://github.com/geiger-rs/cargo-geiger [2]: https://github.com/trailofbits/siderophile
  2. …OS idea, aptly called "Vapor". I think it could be possible in Rust with a linter, something like https://github.com/geiger-rs/cargo-geiger . The Rust compiler has some unsoundness issues such as https://github.com/rust-lang/rust/issues/843…
  3. …tried that before resorting to just using `rg`, unfortunately this issue prevents it from working: https://github.com/geiger-rs/cargo-geiger/issues/523
  4. For this kind of analysis, https://github.com/geiger-rs/cargo-geiger comes in handy.
  5. …looking at the crates themselves, you might want to check your (or others') Rust application with https://github.com/rust-secure-code/cargo-geiger to get a sense of effective prevalence. I also dispute that the presence of unsafe somewhere…
    comment by estebank · 2023-10-26 · in Was Rust Worth It?
  6. For that, I believe you need to use cargo-geiger[0] and audit the results. [0] - https://github.com/rust-secure-code/cargo-geiger
  7. …help depending on what exactly you need. https://github.com/rustsec/rustsec/tree/main/cargo-audit https://github.com/rust-secure-code/cargo-geiger https://github.com/crev-dev/cargo-crev
    comment by throwup · 2022-12-01 · in Memory Safe Languages in Android 13
  8. …a while ago due to the maintainer having a bit of a cavalier attitude towards unsafe usage. Etc. 0: https://github.com/rust-secure-code/cargo-geiger
    comment by andrewzah · 2022-03-15 · in Ask HN: What's the Deal with HN and Rust?
  9. …geiger`[1] and `siderophile`[2] (FD: my company's tool) bring us a little closer to that. [1]: https://github.com/rust-secure-code/cargo-geiger [2]: https://github.com/trailofbits/siderophile
    comment by woodruffw · 2021-07-16 · in Is Rust Used Safely by Software Developers?
  10. There exist unofficial tools for counting the number of unsafe blocks in a project: https://github.com/rust-secure-code/cargo-geiger However a sufficiently determined evil crate can use soundness holes (like fake-static) or macros (like…
    comment by nyanpasu64 · 2021-05-06 · in The Rustonomicon
  11. Related to what you are looking for is https://github.com/rust-secure-code/cargo-geiger which analyzes the dependency tree for unsafe but afaik it doesn't actually show each individual block. The readme is quite good.
  12. cargo-geiger isn't foolproof, there are well-known false negatives: https://github.com/rust-secure-code/cargo-geiger/issues/101
    comment by EE84M3i · 2020-09-21 · in Why Not Rust?
  13. …to see the unsafe{} uses in my code and dependencies [0]. Use unsafe{} at your own risk. [1] [0] https://github.com/rust-secure-code/cargo-geiger [1] https://arxiv.org/abs/2003.03296