Document the sysroot field in JsonProject
rust-analyzer supports both `sysroot` and `sysroot_src` in `rust-project.json`. Document `sysroot` and show example values for both fields.
This commit is contained in:
parent
9c03aa1ac2
commit
5da14237eb
@ -653,9 +653,28 @@ However, if you use some other build system, you'll have to describe the structu
|
|||||||
[source,TypeScript]
|
[source,TypeScript]
|
||||||
----
|
----
|
||||||
interface JsonProject {
|
interface JsonProject {
|
||||||
|
/// Path to the sysroot directory.
|
||||||
|
///
|
||||||
|
/// The sysroot is where rustc looks for the
|
||||||
|
/// crates that are built-in to rust, such as
|
||||||
|
/// std.
|
||||||
|
///
|
||||||
|
/// https://doc.rust-lang.org/rustc/command-line-arguments.html#--sysroot-override-the-system-root
|
||||||
|
///
|
||||||
|
/// To see the current value of sysroot, you
|
||||||
|
/// can query rustc:
|
||||||
|
///
|
||||||
|
/// ```
|
||||||
|
/// $ rustc --print sysroot
|
||||||
|
/// /Users/yourname/.rustup/toolchains/stable-x86_64-apple-darwin
|
||||||
|
/// ```
|
||||||
|
sysroot?: string;
|
||||||
/// Path to the directory with *source code* of
|
/// Path to the directory with *source code* of
|
||||||
/// sysroot crates.
|
/// sysroot crates.
|
||||||
///
|
///
|
||||||
|
/// By default, this is `lib/rustlib/src/rust/library`
|
||||||
|
/// relative to the sysroot.
|
||||||
|
///
|
||||||
/// It should point to the directory where std,
|
/// It should point to the directory where std,
|
||||||
/// core, and friends can be found:
|
/// core, and friends can be found:
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user