Rust
To index Rust we use rust-analyzer in LSIF mode. Pre-built binaries of rust-analyzer can be used as indexers that emit LSIF from Rust source.
Run the indexerβ
The indexer is run via the main glean
CLI tool.
> cabal build exe:glean
And index your Rust repository with:
glean index rust-lsif DIR --db NAME/INSTANCE
where
DIR
is the root directory containing the Rust projectname/hash
is the name of the repository to create
Provide the usual --db-root
and --schema
or --service
arguments
to glean
In the shellβ
Rust source can also be indexed directly from the Glean shell:
:index rust-lsif DIR
The shell will pick a DB name and hash for you based on DIR
.
Schemaβ
The schema is in glean/schema/source/lsif.angle