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β
Ensure that you have built and installed Glean and
the glean
executable is on your PATH
.
Index your Rust repository with:
glean index rust-lsif DIR --db-root DB --db NAME/INSTANCE
where
DB
is the directory where you want to store your Glean DBsDIR
is the root directory containing the Rust projectNAME/INSTANCE
is the name of the repository to create
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