Note to reader: Some links below are broken or refer to older versions of Exercism. Exercism's v3 documentation documents the current and future efforts.
rust-analyzer
is a static analysis utility that is used for the automatic mentoring of the common Rust track solutions. It is being developed as part of the Exercism Strategy initiative. The general design of the utility conforms to the Interface document.
The utility can be used on the local machine. It accepts two required parameters:
--path
(-p
) - path to the solution directory.--slug
(-s
) - the slug of the exercise that is being analyzed.
For example:
$ rust-analyzer -p ~/solution-238382y7sds7fsadfasj23j/ -s reverse-string
In the context of the automatic mentoring the utility is invoked inside the Docker container via the bin/analyze.sh
script.
You should have the latest stable version of Rust installed on you machine (for instance using rustup). Then from the project root run
$ cargo build
To run the utility using Cargo execute the following command:
$ cargo run -- -s exercise_slug -p /path/to/the/solution/directory
To run test use the following command:
$ cargo test
From the project root use the following command:
$ docker build -t rust_analyzer .