07 2026 档案
摘要:编译系统 参考文档: 图解Rust编译器与语言设计: https://rustmagazine.github.io/rust_magazine_2021/chapter_1/rustc_part1.html Rust编译过程 rustc 的编译过程包含两个层面的“转换阶段”: 一是源代码到可执行文件
阅读全文
摘要:字符集 解剖Rust: 字符集 词汇表 程序项 Rust使用Unicode字符集 字符使用UTF32编码 字串使用UTF8编码! 由此导致编译器限制: 字串(&str)完全禁止索引 字串(&str)有限支持切片, 遇到非法UTF8边界会panic! 例如: fn main() { let s = "
阅读全文
浙公网安备 33010602011771号