01Overview
rust · 4,137,604 lines of actual code
Line Composition
5,308,824 total lines
Code4,137,60477.9%
Blank467,7908.8%
Comments703,43013.3%
Reading rust-lang/rust via an LLM
~29.0M tokens
→
~1.4k tokens
via code_analyze
The entire repo summarised by code_analyze — structured JSON in <2k tokens. The dossier above is built from one call. Drill into specifics with code_search.
02Languages & Tech Stack
what it’s written in, what it depends on
Language Breakdown
Language
Files
Code
Share
03Notable Files
where complexity and size live
Most Complex
| File | Lines | Cx |
| tests/ui/expr/if/expr-stack-overflow.rs | 10,416 | 15,615 |
| src/tools/rust-analyzer/crates/syntax/src/ast/generated/nodes.rs | 11,027 | 2,451 |
| src/librustdoc/html/static/js/search.js | 4,160 | 1,326 |
| compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs | 6,342 | 1,323 |
| library/stdarch/crates/core_arch/src/aarch64/sve/ld_st_tests_aarch64.rs | 12,786 | 1,200 |
| tests/ui/try-trait/deep-try-chain-issue-153583.rs | 4 | 1,152 |
| compiler/rustc_middle/src/ty/print/pretty.rs | 2,877 | 935 |
| compiler/rustc_resolve/src/late/diagnostics.rs | 4,187 | 900 |
| compiler/rustc_parse/src/parser/expr.rs | 3,489 | 855 |
| compiler/rustc_hir_typeck/src/method/suggest.rs | 4,495 | 848 |
Largest
| File | Lines | Cx |
| library/stdarch/intrinsics_data/arm_intrinsics.json | 319,341 | 0 |
| src/doc/rustc-dev-guide/src/queries/example-0.html | 313,328 | 0 |
| library/stdarch/intrinsics_data/x86-intel.xml | 158,323 | 0 |
| library/stdarch/crates/core_arch/src/arm_shared/neon/generated.rs | 71,298 | 241 |
| library/stdarch/crates/core_arch/src/x86/avx512f.rs | 48,200 | 247 |
| library/stdarch/crates/core_arch/src/aarch64/sve/generated.rs | 44,972 | 27 |
| library/stdarch/crates/core_arch/src/aarch64/neon/generated.rs | 31,516 | 242 |
| src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs | 24,317 | 0 |
| library/stdarch/crates/core_arch/src/aarch64/sve2/generated.rs | 23,871 | 190 |
| library/stdarch/crates/core_arch/src/x86/avx512fp16.rs | 19,214 | 68 |
04Code Quality
style, correctness, and maintainability findings
By Severity & Category
By Category
accessibility 460
concurrency 3
correctness 22893
maintainability 5355
modernization 4
performance 3291
safety 12858
security 206
Top Findings
Warning: '.unwrap()' will panic on None/Err variants. Prefer using pattern matching (match, if let), combinators (map, and_then), or the '?' operator for robust error handling. ×2
Warning: Direct indexing (e.g., `vec[i]`, `slice[i]`) panics on out-of-bounds access. Prefer using `.get(index)` or `.get_mut(index)` which return Option<&T>/Option<&mut T>. ×2
Warning: '.expect()' will panic with a custom message on None/Err. While better than unwrap() for debugging, prefer non-panicking error handling in production code (match, if let, ?).
05Secrets & Credentials
pattern-based scan for hardcoded secrets
generic-credential-uri — Detected a password embedded in a service connection URI, which may expose direct access to the referenced service.
aws-access-key-id — Identified a standalone AWS access key ID, with no AWS secret access key beside it. Graded low because a key ID is the public half of the credential and authenticates nothing on its own: the secret access key is what signs a request. It is still worth acting on. It names the AWS account and the IAM identity it was issued under, it shows this code reaches AWS with a long-lived key rather than a role, and it completes an attack if the matching secret leaked anywhere else. Check whether the key is still active and rotate it if it is.
aws-access-key-id — Identified a standalone AWS access key ID, with no AWS secret access key beside it. Graded low because a key ID is the public half of the credential and authenticates nothing on its own: the secret access key is what signs a request. It is still worth acting on. It names the AWS account and the IAM identity it was issued under, it shows this code reaches AWS with a long-lived key rather than a role, and it completes an attack if the matching secret leaked anywhere else. Check whether the key is still active and rotate it if it is.
generic-credential-uri — Detected a password embedded in a service connection URI, which may expose direct access to the referenced service.
06Search This Repo
live, powered by code_search
Scan another repository
Drop any public git URL or owner/repo shorthand.
Or compare rust-lang/rust against another repo:
Or use the API directly: curl https://api.searchcode.com/api/v1/code_analyze · Add to your MCP client
Generated by searchcode.com · code intelligence for LLMs
data from code_analyze · cached by commit SHA · source on github.com