One of the challenges with rustc is that the RLS can't handle it, since it's a bootstrapping compiler. This makes code navigation difficult. One solution is to use ctags.
ctags has a long history and several variants. Exuberant Ctags seems to be quite commonly distributed but it does not have out-of-box Rust support. Some distributions seem to use Universal Ctags, which is a maintained fork and does have built-in Rust support.
自备笔记 长期更新
待在家里太无聊了, std 文档不够看了, 准备开始看 rust 编译器
环境准备
看How to Build and Run the Compiler就行了
config.toml
提前把llvm-config
安装了,不然编译一次llvm
很费时间debug-info
带上gdb
x.py
自带rust-gdb
,rust-lldb
和rust-gdbgui
,建议用gdb
src/librust_mir/borrow_check/mod.rs
,断点命令b rustc_mir::borrow_check::xxx
,把前面 lib 去掉ctags
rls
无法处理跳转,交叉引用又是个问题官方推荐的是用 ctags 不过这玩意太古老不太喜欢用
但是实际
rls
在 vsc 多屏幕勉强够用=, =ICE
glacier Rustlang 奇怪的repo
专门收集ICE的地方, 这样 POC容易找了
Contributing to Glacier is fairly easy
水 pr 也是很爽的资料
MIR
https://blog.rust-lang.org/2016/04/19/MIR.html
https://rustc-dev-guide.rust-lang.org
最重要的是代码的注释 rfc 还有 pr 时候讨论
如果还不懂的话就去讨论区水喽, 虽然感觉没啥人, 可能时差问题回复很慢,但是人都很热情.而且都是大佬 Orz
t-compiler
stream on the Zulip instancecompiler
channel on the rust-lang discord