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
    /// sysroot crates.
    ///
    /// By default, this is `lib/rustlib/src/rust/library`
    /// relative to the sysroot.
    ///
    /// It should point to the directory where std,
    /// core, and friends can be found:
    ///
    /// https://github.com/rust-lang/rust/tree/master/library.
    ///
    /// If provided, rust-analyzer automatically adds
    /// dependencies on sysroot crates. Conversely,
    /// if you omit this path, you can specify sysroot
    /// dependencies yourself and, for example, have
    /// several different "sysroots" in one graph of
    /// crates.
    sysroot_src?: string;
    /// The set of crates comprising the current
    /// project. Must include all transitive
    /// dependencies as well as sysroot crate (libstd,
    /// libcore and such).
    crates: Crate[];
}

interface Crate {
    /// Optional crate name used for display purposes,
    /// without affecting semantics. See the `deps`
    /// key for semantically-significant crate names.
    display_name?: string;
    /// Path to the root module of the crate.
    root_module: string;
    /// Edition of the crate.
    edition: "2015" | "2018" | "2021";
    /// Dependencies
    deps: Dep[];
    /// Should this crate be treated as a member of
    /// current "workspace".
    ///
    /// By default, inferred from the `root_module`
    /// (members are the crates which reside inside
    /// the directory opened in the editor).
    ///
    /// Set this to `false` for things like standard
    /// library and 3rd party crates to enable
    /// performance optimizations (rust-analyzer
    /// assumes that non-member crates don't change).
    is_workspace_member?: boolean;
    /// Optionally specify the (super)set of `.rs`
    /// files comprising this crate.
    ///
    /// By default, rust-analyzer assumes that only
    /// files under `root_module.parent` can belong
    /// to a crate. `include_dirs` are included
    /// recursively, unless a subdirectory is in
    /// `exclude_dirs`.
    ///
    /// Different crates can share the same `source`.
    ///
    /// If two crates share an `.rs` file in common,
    /// they *must* have the same `source`.
    /// rust-analyzer assumes that files from one
    /// source can't refer to files in another source.
    source?: {
        include_dirs: string[],
        exclude_dirs: string[],
    },
    /// The set of cfgs activated for a given crate, like
    /// `["unix", "feature=\"foo\"", "feature=\"bar\""]`.
    cfg: string[];
    /// Target triple for this Crate.
    ///
    /// Used when running `rustc --print cfg`
    /// to get target-specific cfgs.
    target?: string;
    /// Environment variables, used for
    /// the `env!` macro
    env: { [key: string]: string; },

    /// Whether the crate is a proc-macro crate.
    is_proc_macro: boolean;
    /// For proc-macro crates, path to compiled
    /// proc-macro (.so file).
    proc_macro_dylib_path?: string;
}

interface Dep {
    /// Index of a crate in the `crates` array.
    crate: number,
    /// Name as should appear in the (implicit)
    /// `extern crate name` declaration.
    name: string,
}

Rust相关代码片段

rust : nearest neighbour algorithm

Rust Change Character into Integer

Rust variables

Data Types Rust

rust enum values

rust protobuf

rust byte literal

rust unzip

global variables rust

rust error

rust don't open window on run

rust unused Result that must be used

rust run async function

rust how to add standard crate to cargo toml

rust save image file

rust print char variables

rust charxor

rust match ok err

rust vector get element at index

serde derive feature

pow in rust

type annotation needed rust

sum of squares formula

rust int types

rust unwrap error

rust permutations

rust match guard enum variant

rust generic numeric type

rust move out of mut ref

rust unpack struct with custom name

rust change enum type of self

rust switch from nightly to stable

chromiumoxide rust proxy

rust expected usize found i32

println! before user input not printing

rust give const value to enum member

rust chromiumoxide proxy server

rust database

difference between the dedup and unique

Local connect to a rust server

rust listdir to string list

rs implement hash for enum with special case

rust fibonacci sequence

how to install some version of rust as default

verify and extract login from an email address

Parse the mime type of a http response

Rust Listen on unused port TCP/IP

create bin rust

rust itertools

why rust analyzer only work with cargo

Print Hashmap in rust

rust iterate over vector with index

length of array in rust

check length in rust

valence system ecs rust

rust vs node performance

rust enum with value

what is ? in rust

match and store variable in rust

rust env_logger default level

rust create array with x entries

rust random bytes < 32

rust random bytes > 32

Rust Download windows

rust vector with capacity

read from console rust

rust vector join

rust implement partialeq

rust cmp ordering match

rust dev dependencies

rust parse i32

std::cmp::Ordering

do while rust

rust to ascii code

rust chars lowercase

divide a string rust index

bevy optional resource

add function to struct rust

rust sort iterator

rust create slice from vector