Repository navigation
Conversation
Update the Rust xray engine (xray-cli and xray-core) from the internal repository. This brings the graph-based code analysis engine up to date with the latest development. xray-cli (1 file, 155KB): - Main entry point for the Rust xray analysis engine - 7 e2e test suites covering graph analysis, cross-toolchain, graph handles, observability, dead code, lifetime analysis, refinement xray-core (~105 source + ~55 test files): - Graph engine: CSR adjacency, builder, code graph, wire format, symbol table, string table, repo index, user facts - Compiler: pipeline, preamble, diagnostics, rustc driver, assembler - Graph binding: admission, budget-bind, depth, families, narrowing, receiver, resolve, scope, name-index, same-class-qualified - Graph analysis: memory ceiling, process analysis - Extractors: Java (full), Kotlin (full), local index - Supporting: cache, child-group-reaper, dynlib, evaluators, finding, confidence, budget (completeness, ladder, referenced-bits), fused graph, graph cache, identity, reasons, refine, languages, owned-node, scanner, validator xray-benchmarks: bench.sh + 4 evaluator benchmarks spike_patterns: 3 pattern prototype scripts Existing Cargo.lock preserved. Internal references scrubbed.
This was referenced Nov 5, 2026
added 3 commits
November 6, 2026 16:05
- Add the 3 crate-internal imports (debug_log, FactsHandle/GraphHandle, DeclarationKind/EdgeReason/SymbolId/UserFact/Visibility) to ALLOWED_IMPORTS with per-entry safety rationale - Rewrite doc comment and assert message to describe the invariant without explaining how to bypass the validator - Move ASSEMBLED_INTO_EVERY_EVALUATOR to assemble.rs as ASSEMBLED_PARTS (the module that owns the assembly functions is the authoritative source for the list of assembled constants)
- Clamp to rlim_cur (not rlim_max) so the sandbox can never raise an inherited soft limit — only lower it - Move env-var read from spawn_rustc_child to run_rustc_with_timeout and pass the parsed limit as a parameter (testable without set_var) - Rewrite env-mutating test as a direct spawn_rustc_child call with a known limit to avoid data races in parallel test execution - Lower test constant from 1 GiB to 64 MiB to stay below CI hard limits
- Cap line_content_at output to 1024 bytes on a char boundary (a minified or binary-ish line can be arbitrarily large) - Use into_iter + move instead of iter + clone in the JSON output branch (result.findings is consumed only once there)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Syncs the Rust xray engine (
rust/) from the internal repository — the graph-based code analysis engine that powers xray's Java and Kotlin analysis.Crates updated
rust/xray-clirust/xray-corerust/xray-benchmarksrust/spike_patternsxray-core highlights
Notes
Cargo.lockis preserved (the internal repo's.gitignoreblocks*.lock)rust-toolchain.tomlandrust-automation.shalso syncedScrubbing applied
Relationship to other PRs
Merge order: this PR depends on PR #2123 (feat/rust-shared-types) landing first — both touch
rust/xray-core/src/compiler/and share the preamble/graph_preamble type paths.