rust-analyzer README

The project's README from github.com/rust-lang/rust-analyzer. As one markdown file: README.md.

rust-analyzer logo

rust-analyzer is a language server that provides IDE functionality for writing Rust programs. You can use it with any editor that supports the Language Server Protocol (VS Code, Vim, Emacs, Zed, etc).

rust-analyzer features include go-to-definition, find-all-references, refactorings and code completion. rust-analyzer also supports integrated formatting (with rustfmt) and integrated diagnostics (with rustc and clippy).

Internally, rust-analyzer is structured as a set of libraries for analyzing Rust code. See Architecture in the manual.

codecov

Quick Start

https://rust-analyzer.github.io/book/installation.html

Documentation

If you want to contribute to rust-analyzer check out the CONTRIBUTING.md or if you are just curious about how things work under the hood, see the Contributing section of the manual.

If you want to use rust-analyzer's language server with your editor of choice, check the manual. It also contains some tips & tricks to help you be more productive when using rust-analyzer.

Security and Privacy

See the security and privacy sections of the manual.

Communication

For usage and troubleshooting requests, please use "IDEs and Editors" category of the Rust forum:

https://users.rust-lang.org/c/ide/14

For questions about development and implementation, join rust-analyzer working group on Zulip:

https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer

License

rust-analyzer is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.

rust-analyzer (rust-lang/rust-analyzer)

Searching Database…

这是什么?rust-analyzer 是一个语言服务器,为编写 Rust 程序提供 IDE 功能——也就是你在编辑器里写 Rust 时所依赖的代码智能引擎。
它是一个可以单独运行的软件,还是装在编辑器里面的东西?既不是独立软件,也不是编辑器本身:它是一个语言服务器,由你的编辑器连接使用。在内部,它甚至是以一组用于分析 Rust 代码的库的形式构建的。
怎么让它在我的编辑器里跑起来?README 会引导你去查阅手册:里面有针对各种编辑器的安装说明,还有帮你更高效地使用 rust-analyzer 的技巧。
它能在哪些编辑器里用?任何支持语言服务器协议(Language Server Protocol)的编辑器都可以——README 里点名了 VS Code、Vim、Emacs 和 Zed 等。
rust-analyzer 是 Rust 官方项目,还是第三方工具?它在 GitHub 上隶属于官方的 rust-lang 组织开发,从 2017 年 12 月就开始了,目前大约有 16.9k 颗星,仓库里还配有 CI 和模糊测试(fuzzing)流程。
为什么说它是一个编译器前端——它能取代 rustc 吗?不能。这里的前端是指它会像编译器那样解析和分析 Rust 代码,但它的产出是给编辑器用的代码智能,而不是编译出来的二进制文件;诊断信息仍然由 rustc 和 clippy 提供。
Creator
rust-lang
Size
123.9 MB
Stars
16.9K
Age
8y
Commits · 90 Days