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

Rust: extract crate graph #18228

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Rust: extract crate graph #18228

wants to merge 11 commits into from

Conversation

aibaars
Copy link
Contributor

@aibaars aibaars commented Dec 6, 2024

This pull request changes the Rust extractor to emit information about the crate graph, and the public modules, types, traits and function signatures contained in each crate. This should give our analyses information about names and types provided by the dependencies of a project. The information in the crate graph is represented as AST nodes without macro calls; type paths should be fully qualified and methods/functions have no bodies.

This PR currently does not extract generic type arguments , where clauses, and associated types and aliases. These should be added in a follow-up pull request.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Dec 6, 2024
@aibaars aibaars force-pushed the aibaars/crate-graph branch 5 times, most recently from 48783f3 to e0ecf47 Compare December 9, 2024 16:56
@aibaars aibaars force-pushed the aibaars/crate-graph branch 5 times, most recently from 9f083b9 to 7419e77 Compare December 11, 2024 09:10
@aibaars aibaars force-pushed the aibaars/crate-graph branch 3 times, most recently from 4c9e103 to 83111f3 Compare December 18, 2024 21:01
@aibaars aibaars force-pushed the aibaars/crate-graph branch from 4782bc1 to b3ed09d Compare January 15, 2025 13:04
@aibaars aibaars force-pushed the aibaars/crate-graph branch 2 times, most recently from c651fee to ed57708 Compare February 27, 2025 11:09
@aibaars aibaars marked this pull request as ready for review February 27, 2025 11:47
@aibaars aibaars requested a review from a team as a code owner February 27, 2025 11:47
private import codeql.rust.elements.internal.generated.Raw
import codeql.rust.elements.Crate
import codeql.rust.elements.internal.ElementImpl::Impl as ElementImpl
import codeql.rust.elements.Module

Check warning

Code scanning / CodeQL

Redundant import Warning generated

Redundant import, the module is already imported inside
codeql.rust.elements.Crate
.
@aibaars aibaars force-pushed the aibaars/crate-graph branch 3 times, most recently from 95cbd9b to 7d08551 Compare February 27, 2025 13:21
@aibaars aibaars force-pushed the aibaars/crate-graph branch from 7d08551 to e97b971 Compare February 27, 2025 13:35
@aibaars aibaars force-pushed the aibaars/crate-graph branch from 1c88806 to e97fe89 Compare February 28, 2025 11:27
@aibaars aibaars force-pushed the aibaars/crate-graph branch from e97fe89 to 2de8165 Compare February 28, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants