Crate rust_analyzer_discover

Source
Expand description

Binary used for automatic Rust workspace discovery by rust-analyzer. See rust-analyzer documentation for a thorough description of this interface.

Modulesยง

query ๐Ÿ”’
rust_project ๐Ÿ”’
Library for generating rust_project.json files from a Vec<CrateSpec> See official documentation of file format at https://rust-analyzer.github.io/manual.html

Re-exportsยง

pub use rust_project::DiscoverProject;
pub use rust_project::RustAnalyzerArg;

Constantsยง

WORKSPACE_ROOT_FILE_NAMES
BUILD_FILE_NAMES

Functionsยง

find_workspace_root_file ๐Ÿ”’
Looks within the current directory for a file that marks a bazel workspace.
project_discovery ๐Ÿ”’
write_discovery ๐Ÿ”’
main ๐Ÿ”’

Structsยง

Config
ConfigParser ๐Ÿ”’

Functionsยง

generate_rust_project
bazel_info
Executes bazel info to get a map of context information.
bazel_command ๐Ÿ”’
deserialize_file_content ๐Ÿ”’
source_file_to_buildfile ๐Ÿ”’
rust-analyzer associates workspaces with buildfiles. Therefore, when it passes in a source file path, we use this function to identify the buildfile the file belongs to.
buildfile_to_targets ๐Ÿ”’

Structsยง

ToolchainInfo ๐Ÿ”’