Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 21 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
# scip-rust

At the moment, this is just a tiny wrapper around `rust-analyzer` to generate SCIP data,
with the configuration set up for use by Sourcegraph.
A thin wrapper around `rust-analyzer scip`.

## Usage

Install [`rust-analyzer`](https://rust-analyzer.github.io/book/installation.html) (any recent
release works), make sure `cargo` and `rustc` are on `PATH`, then from the root of your
workspace run:
Make sure you have a working Rust toolchain (`cargo` and `rustc` on `PATH`) and
[`rust-analyzer`] installed. Then, from the root of your workspace:

```sh
``` sh
rust-analyzer scip .
```

The [`scip-rust`](./scip-rust) script in this repo is the same one-liner with a few
preflight checks; you can drop it into `PATH` if you prefer a stable command name.
That's really all it does. The [`scip-rust`] script in this repo is the same
command with a few preflight checks and toolchain fallbacks --- drop it into
`PATH` if you want a stable command name.

For CI, the `sourcegraph/scip-rust` Docker image bundles everything:
### Docker

```sh
For CI, the `sourcegraph/scip-rust` image bundles everything:

``` sh
docker run --rm -v "$PWD:/work" sourcegraph/scip-rust
```

If you want to upload LSIF to Sourcegraph.com in CI, check out
[lsif-rust-action](https://github.com/sourcegraph/lsif-rust-action) instead.
### Nix

If you use Nix, run it straight from the flake:

``` sh
nix run github:sourcegraph/scip-rust
```

[`rust-analyzer`]: https://rust-analyzer.github.io/book/installation.html
[`scip-rust`]: ./scip-rust
Loading