msgid "" msgstr "" "Project-Id-Version: Comprehensive Rust 🦀\n" "POT-Creation-Date: \n" "PO-Revision-Date: 2023-09-24 10:41-0300\n" "Last-Translator: \n" "Language-Team: Language zh-Hans\n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Poedit 3.3.2\n" #: src/SUMMARY.md:4 src/index.md:1 msgid "Welcome to Comprehensive Rust 🦀" msgstr "欢迎来到 Comprehensive Rust 🦀" #: src/SUMMARY.md:5 src/running-the-course.md:1 msgid "Running the Course" msgstr "授课" #: src/SUMMARY.md:6 src/running-the-course/course-structure.md:1 msgid "Course Structure" msgstr "课程结构" #: src/SUMMARY.md:7 src/running-the-course/keyboard-shortcuts.md:1 msgid "Keyboard Shortcuts" msgstr "键盘快捷键" #: src/SUMMARY.md:8 src/running-the-course/translations.md:1 msgid "Translations" msgstr "翻译" #: src/SUMMARY.md:9 src/cargo.md:1 msgid "Using Cargo" msgstr "使用 Cargo" #: src/SUMMARY.md:10 msgid "Rust Ecosystem" msgstr "Rust 生态系统" #: src/SUMMARY.md:11 msgid "Code Samples" msgstr "代码示例" #: src/SUMMARY.md:12 msgid "Running Cargo Locally" msgstr "在本地运行 Cargo" #: src/SUMMARY.md:15 msgid "Day 1: Morning" msgstr "第一天:早上" #: src/SUMMARY.md:19 src/SUMMARY.md:79 src/SUMMARY.md:134 src/SUMMARY.md:192 #: src/SUMMARY.md:218 src/SUMMARY.md:268 msgid "Welcome" msgstr "欢迎" #: src/SUMMARY.md:20 src/welcome-day-1/what-is-rust.md:1 msgid "What is Rust?" msgstr "什么是 Rust?" #: src/SUMMARY.md:21 src/hello-world.md:1 msgid "Hello World!" msgstr "Hello World!" #: src/SUMMARY.md:22 src/hello-world/small-example.md:1 msgid "Small Example" msgstr "简短示例" #: src/SUMMARY.md:23 src/why-rust.md:1 msgid "Why Rust?" msgstr "为什么选择 Rust?" #: src/SUMMARY.md:24 src/why-rust/compile-time.md:1 msgid "Compile Time Guarantees" msgstr "编译期保障" #: src/SUMMARY.md:25 src/why-rust/runtime.md:1 msgid "Runtime Guarantees" msgstr "运行时保障" #: src/SUMMARY.md:26 src/why-rust/modern.md:1 msgid "Modern Features" msgstr "现代特性" #: src/SUMMARY.md:27 src/basic-syntax.md:1 msgid "Basic Syntax" msgstr "基本语法" #: src/SUMMARY.md:28 src/basic-syntax/scalar-types.md:1 msgid "Scalar Types" msgstr "标量类型" #: src/SUMMARY.md:29 src/basic-syntax/compound-types.md:1 msgid "Compound Types" msgstr "复合类型" #: src/SUMMARY.md:30 src/basic-syntax/references.md:1 msgid "References" msgstr "引用" #: src/SUMMARY.md:31 src/basic-syntax/references-dangling.md:1 msgid "Dangling References" msgstr "悬垂引用" #: src/SUMMARY.md:32 src/basic-syntax/slices.md:1 msgid "Slices" msgstr "切片" #: src/SUMMARY.md:33 msgid "String vs str" msgstr "String 和 str" #: src/SUMMARY.md:34 src/basic-syntax/functions.md:1 msgid "Functions" msgstr "函数" #: src/SUMMARY.md:35 src/basic-syntax/rustdoc.md:1 msgid "Rustdoc" msgstr "Rustdoc" #: src/SUMMARY.md:36 src/SUMMARY.md:102 src/basic-syntax/methods.md:1 #: src/methods.md:1 msgid "Methods" msgstr "方法" #: src/SUMMARY.md:37 msgid "Overloading" msgstr "重载" #: src/SUMMARY.md:38 src/SUMMARY.md:71 src/SUMMARY.md:105 src/SUMMARY.md:125 #: src/SUMMARY.md:154 src/SUMMARY.md:184 src/SUMMARY.md:211 src/SUMMARY.md:232 #: src/SUMMARY.md:260 src/SUMMARY.md:282 src/SUMMARY.md:303 #: src/exercises/android/morning.md:1 src/exercises/bare-metal/morning.md:1 #: src/exercises/bare-metal/afternoon.md:1 #: src/exercises/concurrency/morning.md:1 #: src/exercises/concurrency/afternoon.md:1 msgid "Exercises" msgstr "习题" #: src/SUMMARY.md:39 src/exercises/day-1/implicit-conversions.md:1 msgid "Implicit Conversions" msgstr "隐式类型转换" #: src/SUMMARY.md:40 msgid "Arrays and for Loops" msgstr "数组与 for 循环" #: src/SUMMARY.md:42 msgid "Day 1: Afternoon" msgstr "第 1 天:下午" #: src/SUMMARY.md:44 src/SUMMARY.md:295 src/control-flow.md:1 msgid "Control Flow" msgstr "控制流" #: src/SUMMARY.md:45 src/control-flow/blocks.md:1 msgid "Blocks" msgstr "块" #: src/SUMMARY.md:46 msgid "if expressions" msgstr "if 表达式" #: src/SUMMARY.md:47 msgid "for expressions" msgstr "for 表达式" #: src/SUMMARY.md:48 msgid "while expressions" msgstr "while 表达式" #: src/SUMMARY.md:49 msgid "break & continue" msgstr "break & continue" #: src/SUMMARY.md:50 msgid "loop expressions" msgstr "loop 表达式" #: src/SUMMARY.md:52 src/basic-syntax/variables.md:1 msgid "Variables" msgstr "变量" #: src/SUMMARY.md:53 src/basic-syntax/type-inference.md:1 msgid "Type Inference" msgstr "类型推导" #: src/SUMMARY.md:54 msgid "static & const" msgstr "静态与常量" #: src/SUMMARY.md:55 src/basic-syntax/scopes-shadowing.md:1 msgid "Scopes and Shadowing" msgstr "作用域和隐藏 (Shadowing)" #: src/SUMMARY.md:56 src/enums.md:1 msgid "Enums" msgstr "枚举" #: src/SUMMARY.md:57 src/enums/variant-payloads.md:1 msgid "Variant Payloads" msgstr "变体载荷" #: src/SUMMARY.md:58 src/enums/sizes.md:1 msgid "Enum Sizes" msgstr "枚举大小" #: src/SUMMARY.md:60 src/control-flow/novel.md:1 #, fuzzy msgid "Novel Control Flow" msgstr "控制流" #: src/SUMMARY.md:61 msgid "if let expressions" msgstr "if let 表达式" #: src/SUMMARY.md:62 msgid "while let expressions" msgstr "while let 表达式" #: src/SUMMARY.md:63 msgid "match expressions" msgstr "match 表达式" #: src/SUMMARY.md:65 src/SUMMARY.md:73 src/pattern-matching.md:1 msgid "Pattern Matching" msgstr "模式匹配" #: src/SUMMARY.md:66 src/pattern-matching/destructuring-enums.md:1 msgid "Destructuring Enums" msgstr "解构枚举" #: src/SUMMARY.md:67 src/pattern-matching/destructuring-structs.md:1 msgid "Destructuring Structs" msgstr "解构结构体" #: src/SUMMARY.md:68 src/pattern-matching/destructuring-arrays.md:1 msgid "Destructuring Arrays" msgstr "解构数组" #: src/SUMMARY.md:69 src/pattern-matching/match-guards.md:1 msgid "Match Guards" msgstr "匹配守卫" #: src/SUMMARY.md:72 src/exercises/day-1/luhn.md:1 #: src/exercises/day-1/solutions-afternoon.md:3 msgid "Luhn Algorithm" msgstr "Luhn 算法" #: src/SUMMARY.md:75 msgid "Day 2: Morning" msgstr "第二天:上午" #: src/SUMMARY.md:81 src/memory-management.md:1 msgid "Memory Management" msgstr "内存管理" #: src/SUMMARY.md:82 msgid "Stack vs Heap" msgstr "栈 vs 堆" #: src/SUMMARY.md:83 msgid "Stack Memory" msgstr "栈内存" #: src/SUMMARY.md:84 src/memory-management/manual.md:1 msgid "Manual Memory Management" msgstr "手动内存管理" #: src/SUMMARY.md:85 src/memory-management/scope-based.md:1 msgid "Scope-Based Memory Management" msgstr "基于作用域的内存管理" #: src/SUMMARY.md:86 msgid "Garbage Collection" msgstr "垃圾回收" #: src/SUMMARY.md:87 msgid "Rust Memory Management" msgstr "Rust 内存管理" #: src/SUMMARY.md:88 src/ownership.md:1 msgid "Ownership" msgstr "所有权" #: src/SUMMARY.md:89 src/ownership/move-semantics.md:1 msgid "Move Semantics" msgstr "移动语义" #: src/SUMMARY.md:90 src/ownership/moved-strings-rust.md:1 msgid "Moved Strings in Rust" msgstr "Rust 中移动的字符串" #: src/SUMMARY.md:91 msgid "Double Frees in Modern C++" msgstr "现代 C++ 中的双重释放" #: src/SUMMARY.md:92 src/ownership/moves-function-calls.md:1 msgid "Moves in Function Calls" msgstr "函数调用中的移动" #: src/SUMMARY.md:93 src/ownership/copy-clone.md:1 msgid "Copying and Cloning" msgstr "复制和克隆" #: src/SUMMARY.md:94 src/ownership/borrowing.md:1 msgid "Borrowing" msgstr "借用" #: src/SUMMARY.md:95 src/ownership/shared-unique-borrows.md:1 msgid "Shared and Unique Borrows" msgstr "共享和唯一的借用" #: src/SUMMARY.md:96 src/ownership/lifetimes.md:1 msgid "Lifetimes" msgstr "生命周期" #: src/SUMMARY.md:97 src/ownership/lifetimes-function-calls.md:1 msgid "Lifetimes in Function Calls" msgstr "函数调用中的生命周期" #: src/SUMMARY.md:98 src/ownership/lifetimes-data-structures.md:1 msgid "Lifetimes in Data Structures" msgstr "数据结构中的生命周期" #: src/SUMMARY.md:99 src/structs.md:1 msgid "Structs" msgstr "结构体" #: src/SUMMARY.md:100 src/structs/tuple-structs.md:1 msgid "Tuple Structs" msgstr "元组结构体" #: src/SUMMARY.md:101 src/structs/field-shorthand.md:1 msgid "Field Shorthand Syntax" msgstr "字段简写语法" #: src/SUMMARY.md:103 src/methods/receiver.md:1 msgid "Method Receiver" msgstr "方法接收者" #: src/SUMMARY.md:104 src/SUMMARY.md:166 src/SUMMARY.md:281 #: src/methods/example.md:1 src/concurrency/shared_state/example.md:1 msgid "Example" msgstr "示例" #: src/SUMMARY.md:106 src/exercises/day-2/book-library.md:1 #, fuzzy msgid "Storing Books" msgstr "字符串" #: src/SUMMARY.md:107 src/exercises/day-2/health-statistics.md:1 msgid "Health Statistics" msgstr "健康统计" #: src/SUMMARY.md:109 msgid "Day 2: Afternoon" msgstr "第二天:下午" #: src/SUMMARY.md:111 src/std.md:1 msgid "Standard Library" msgstr "标准库" #: src/SUMMARY.md:112 msgid "Option and Result" msgstr "Option 和 Result" #: src/SUMMARY.md:113 src/std/string.md:1 msgid "String" msgstr "String" #: src/SUMMARY.md:114 msgid "Vec" msgstr "Vec" #: src/SUMMARY.md:115 msgid "HashMap" msgstr "哈希表" #: src/SUMMARY.md:116 msgid "Box" msgstr "Box" #: src/SUMMARY.md:117 msgid "Recursive Data Types" msgstr "递归数据类型" #: src/SUMMARY.md:118 src/std/box-niche.md:1 msgid "Niche Optimization" msgstr "小众优化" #: src/SUMMARY.md:119 msgid "Rc" msgstr "Rc" #: src/SUMMARY.md:120 msgid "Cell/RefCell" msgstr "Cell/RefCell" #: src/SUMMARY.md:121 src/modules.md:1 msgid "Modules" msgstr "模块" #: src/SUMMARY.md:122 src/modules/visibility.md:1 msgid "Visibility" msgstr "可见性" #: src/SUMMARY.md:123 src/modules/paths.md:1 msgid "Paths" msgstr "路径" #: src/SUMMARY.md:124 src/modules/filesystem.md:1 msgid "Filesystem Hierarchy" msgstr "文件系统层级结构" #: src/SUMMARY.md:126 src/exercises/day-2/iterators-and-ownership.md:1 msgid "Iterators and Ownership" msgstr "迭代器和所有权" #: src/SUMMARY.md:127 src/exercises/day-2/strings-iterators.md:1 #: src/exercises/day-2/solutions-afternoon.md:3 msgid "Strings and Iterators" msgstr "字符串和迭代器" #: src/SUMMARY.md:130 msgid "Day 3: Morning" msgstr "第三天:上午" #: src/SUMMARY.md:135 src/generics.md:1 msgid "Generics" msgstr "泛型" #: src/SUMMARY.md:136 src/generics/data-types.md:1 msgid "Generic Data Types" msgstr "通用数据类型" #: src/SUMMARY.md:137 src/generics/methods.md:1 msgid "Generic Methods" msgstr "泛型方法" #: src/SUMMARY.md:138 src/generics/monomorphization.md:1 msgid "Monomorphization" msgstr "单态化" #: src/SUMMARY.md:139 src/traits.md:1 msgid "Traits" msgstr "特征" #: src/SUMMARY.md:140 src/traits/trait-objects.md:1 msgid "Trait Objects" msgstr "特征(Trait)对象" #: src/SUMMARY.md:141 src/traits/deriving-traits.md:1 msgid "Deriving Traits" msgstr "派生特征" #: src/SUMMARY.md:142 src/traits/default-methods.md:1 msgid "Default Methods" msgstr "默认方法" #: src/SUMMARY.md:143 src/traits/trait-bounds.md:1 msgid "Trait Bounds" msgstr "特征边界" #: src/SUMMARY.md:144 msgid "impl Trait" msgstr "impl Trait" #: src/SUMMARY.md:145 src/traits/important-traits.md:1 msgid "Important Traits" msgstr "重要特征" #: src/SUMMARY.md:146 msgid "Iterator" msgstr "迭代器" #: src/SUMMARY.md:147 src/traits/from-iterator.md:1 msgid "FromIterator" msgstr "FromIterator" #: src/SUMMARY.md:148 msgid "From and Into" msgstr "From 和 Into" #: src/SUMMARY.md:149 msgid "Read and Write" msgstr "读取和写入" #: src/SUMMARY.md:150 msgid "Drop" msgstr "Drop" #: src/SUMMARY.md:151 msgid "Default" msgstr "Default" #: src/SUMMARY.md:152 msgid "Operators: Add, Mul, ..." msgstr "运算符:Add、Mul..." #: src/SUMMARY.md:153 msgid "Closures: Fn, FnMut, FnOnce" msgstr "闭包:Fn、FnMut、FnOnce" #: src/SUMMARY.md:155 src/exercises/day-3/simple-gui.md:1 #: src/exercises/day-3/solutions-morning.md:3 msgid "A Simple GUI Library" msgstr "一个简单的 GUI 库" #: src/SUMMARY.md:156 src/exercises/day-3/solutions-morning.md:145 msgid "Points and Polygons" msgstr "点和多边形" #: src/SUMMARY.md:158 msgid "Day 3: Afternoon" msgstr "第三天:下午" #: src/SUMMARY.md:160 src/error-handling.md:1 msgid "Error Handling" msgstr "错误处理" #: src/SUMMARY.md:161 src/error-handling/panics.md:1 msgid "Panics" msgstr "Panics" #: src/SUMMARY.md:162 msgid "Catching Stack Unwinding" msgstr "捕获堆栈展开" #: src/SUMMARY.md:163 msgid "Structured Error Handling" msgstr "结构化错误处理" #: src/SUMMARY.md:164 msgid "Propagating Errors with ?" msgstr "使用 ? 传播错误" #: src/SUMMARY.md:165 src/error-handling/converting-error-types.md:1 #: src/error-handling/converting-error-types-example.md:1 msgid "Converting Error Types" msgstr "转换错误类型" #: src/SUMMARY.md:167 src/error-handling/deriving-error-enums.md:1 msgid "Deriving Error Enums" msgstr "派生错误枚举" #: src/SUMMARY.md:168 src/error-handling/dynamic-errors.md:1 msgid "Dynamic Error Types" msgstr "动态错误类型" #: src/SUMMARY.md:169 src/error-handling/error-contexts.md:1 msgid "Adding Context to Errors" msgstr "为错误添加背景信息" #: src/SUMMARY.md:170 src/testing.md:1 msgid "Testing" msgstr "测试" #: src/SUMMARY.md:171 src/testing/unit-tests.md:1 msgid "Unit Tests" msgstr "单元测试" #: src/SUMMARY.md:172 src/testing/test-modules.md:1 msgid "Test Modules" msgstr "测试模块" #: src/SUMMARY.md:173 src/testing/doc-tests.md:1 msgid "Documentation Tests" msgstr "文档测试" #: src/SUMMARY.md:174 src/testing/integration-tests.md:1 msgid "Integration Tests" msgstr "集成测试" #: src/SUMMARY.md:175 src/bare-metal/useful-crates.md:1 msgid "Useful crates" msgstr "实用 crate" #: src/SUMMARY.md:176 src/unsafe.md:1 msgid "Unsafe Rust" msgstr "不安全 Rust" #: src/SUMMARY.md:177 src/unsafe/raw-pointers.md:1 msgid "Dereferencing Raw Pointers" msgstr "解引用裸指针" #: src/SUMMARY.md:178 src/unsafe/mutable-static-variables.md:1 msgid "Mutable Static Variables" msgstr "可变的静态变量" #: src/SUMMARY.md:179 src/unsafe/unions.md:1 msgid "Unions" msgstr "联合体" #: src/SUMMARY.md:180 src/unsafe/calling-unsafe-functions.md:1 msgid "Calling Unsafe Functions" msgstr "调用 Unsafe 函数" #: src/SUMMARY.md:181 src/unsafe/writing-unsafe-functions.md:1 msgid "Writing Unsafe Functions" msgstr "编写 Unsafe 函数" #: src/SUMMARY.md:182 msgid "Extern Functions" msgstr "外部函数" #: src/SUMMARY.md:183 src/unsafe/unsafe-traits.md:1 msgid "Implementing Unsafe Traits" msgstr "实现 Unsafe Trait" #: src/SUMMARY.md:185 src/exercises/day-3/safe-ffi-wrapper.md:1 #: src/exercises/day-3/solutions-afternoon.md:3 msgid "Safe FFI Wrapper" msgstr "安全 FFI 封装容器" #: src/SUMMARY.md:188 src/SUMMARY.md:258 src/bare-metal/android.md:1 msgid "Android" msgstr "Android" #: src/SUMMARY.md:193 src/android/setup.md:1 msgid "Setup" msgstr "设置" #: src/SUMMARY.md:194 src/android/build-rules.md:1 msgid "Build Rules" msgstr "构建规则" #: src/SUMMARY.md:195 msgid "Binary" msgstr "可执行文件" #: src/SUMMARY.md:196 msgid "Library" msgstr "库" #: src/SUMMARY.md:197 src/android/aidl.md:1 msgid "AIDL" msgstr "AIDL" #: src/SUMMARY.md:198 msgid "Interface" msgstr "接口" #: src/SUMMARY.md:199 msgid "Implementation" msgstr "实现" #: src/SUMMARY.md:200 msgid "Server" msgstr "服务器" #: src/SUMMARY.md:201 src/android/aidl/deploy.md:1 msgid "Deploy" msgstr "部署" #: src/SUMMARY.md:202 msgid "Client" msgstr "客户端" #: src/SUMMARY.md:203 src/android/aidl/changing.md:1 msgid "Changing API" msgstr "更改 API" #: src/SUMMARY.md:204 src/SUMMARY.md:248 src/android/logging.md:1 #: src/bare-metal/aps/logging.md:1 msgid "Logging" msgstr "日志记录" #: src/SUMMARY.md:205 src/android/interoperability.md:1 msgid "Interoperability" msgstr "互操作性" #: src/SUMMARY.md:206 msgid "With C" msgstr "与 C 语言交互" #: src/SUMMARY.md:207 msgid "Calling C with Bindgen" msgstr "使用Bindgen调用C语言" #: src/SUMMARY.md:208 msgid "Calling Rust from C" msgstr "从C语言调用Rust语言" #: src/SUMMARY.md:209 src/android/interoperability/cpp.md:1 msgid "With C++" msgstr "与 C++ 交互" #: src/SUMMARY.md:210 msgid "With Java" msgstr "与 Java 交互" #: src/SUMMARY.md:214 msgid "Bare Metal: Morning" msgstr "裸机:上午" #: src/SUMMARY.md:219 msgid "no_std" msgstr "no_std" #: src/SUMMARY.md:220 msgid "A Minimal Example" msgstr "最小示例" #: src/SUMMARY.md:221 msgid "alloc" msgstr "alloc" #: src/SUMMARY.md:222 src/bare-metal/microcontrollers.md:1 msgid "Microcontrollers" msgstr "微控制器" #: src/SUMMARY.md:223 src/bare-metal/microcontrollers/mmio.md:1 msgid "Raw MMIO" msgstr "原始 MMIO" #: src/SUMMARY.md:224 msgid "PACs" msgstr "PAC" #: src/SUMMARY.md:225 msgid "HAL Crates" msgstr "HAL crate" #: src/SUMMARY.md:226 msgid "Board Support Crates" msgstr "板级支持 Crate" #: src/SUMMARY.md:227 msgid "The Type State Pattern" msgstr "类型状态模式" #: src/SUMMARY.md:228 msgid "embedded-hal" msgstr "embedded-hal" #: src/SUMMARY.md:229 msgid "probe-rs, cargo-embed" msgstr "probe-rs、cargo-embed" #: src/SUMMARY.md:230 src/bare-metal/microcontrollers/debugging.md:1 msgid "Debugging" msgstr "Debugging" #: src/SUMMARY.md:231 src/SUMMARY.md:251 msgid "Other Projects" msgstr "其他项目" #: src/SUMMARY.md:233 src/exercises/bare-metal/compass.md:1 #: src/exercises/bare-metal/solutions-morning.md:3 msgid "Compass" msgstr "罗盘" #: src/SUMMARY.md:235 msgid "Bare Metal: Afternoon" msgstr "裸机:下午" #: src/SUMMARY.md:237 msgid "Application Processors" msgstr "应用处理器" #: src/SUMMARY.md:238 src/bare-metal/aps/entry-point.md:1 msgid "Getting Ready to Rust" msgstr "准备使用 Rust" #: src/SUMMARY.md:239 msgid "Inline Assembly" msgstr "内嵌汇编" #: src/SUMMARY.md:240 msgid "MMIO" msgstr "MMIO" #: src/SUMMARY.md:241 msgid "Let's Write a UART Driver" msgstr "编写 UART 驱动程序" #: src/SUMMARY.md:242 msgid "More Traits" msgstr "更多 trait" #: src/SUMMARY.md:243 msgid "A Better UART Driver" msgstr "一个更好的 UART 驱动程序" #: src/SUMMARY.md:244 src/bare-metal/aps/better-uart/bitflags.md:1 msgid "Bitflags" msgstr "Bitflags" #: src/SUMMARY.md:245 msgid "Multiple Registers" msgstr "多个寄存器" #: src/SUMMARY.md:246 src/bare-metal/aps/better-uart/driver.md:1 msgid "Driver" msgstr "驱动程序" #: src/SUMMARY.md:247 src/SUMMARY.md:249 msgid "Using It" msgstr "开始使用" #: src/SUMMARY.md:250 src/bare-metal/aps/exceptions.md:1 #, fuzzy msgid "Exceptions" msgstr "函数" #: src/SUMMARY.md:252 msgid "Useful Crates" msgstr "实用 crate" #: src/SUMMARY.md:253 msgid "zerocopy" msgstr "zerocopy" #: src/SUMMARY.md:254 msgid "aarch64-paging" msgstr "aarch64-paging" #: src/SUMMARY.md:255 msgid "buddy_system_allocator" msgstr "buddy_system_allocator" #: src/SUMMARY.md:256 msgid "tinyvec" msgstr "tinyvec" #: src/SUMMARY.md:257 msgid "spin" msgstr "转动" #: src/SUMMARY.md:259 src/bare-metal/android/vmbase.md:1 msgid "vmbase" msgstr "vmbase" #: src/SUMMARY.md:261 msgid "RTC Driver" msgstr "RTC驱动" #: src/SUMMARY.md:264 msgid "Concurrency: Morning" msgstr "并发编程:入门篇" #: src/SUMMARY.md:269 src/concurrency/threads.md:1 msgid "Threads" msgstr "线程" #: src/SUMMARY.md:270 src/concurrency/scoped-threads.md:1 msgid "Scoped Threads" msgstr "范围线程" #: src/SUMMARY.md:271 src/concurrency/channels.md:1 msgid "Channels" msgstr "通道" #: src/SUMMARY.md:272 src/concurrency/channels/unbounded.md:1 msgid "Unbounded Channels" msgstr "无界通道" #: src/SUMMARY.md:273 src/concurrency/channels/bounded.md:1 msgid "Bounded Channels" msgstr "有界通道" #: src/SUMMARY.md:274 msgid "Send and Sync" msgstr "Send 和 Sync" #: src/SUMMARY.md:274 msgid "Send" msgstr "Send" #: src/SUMMARY.md:274 msgid "Sync" msgstr "Sync" #: src/SUMMARY.md:277 src/concurrency/send-sync/examples.md:1 msgid "Examples" msgstr "示例" #: src/SUMMARY.md:278 src/concurrency/shared_state.md:1 msgid "Shared State" msgstr "共享状态" #: src/SUMMARY.md:279 msgid "Arc" msgstr "Arc" #: src/SUMMARY.md:280 msgid "Mutex" msgstr "Mutex" #: src/SUMMARY.md:283 src/SUMMARY.md:304 #: src/exercises/concurrency/dining-philosophers.md:1 #: src/exercises/concurrency/solutions-morning.md:3 msgid "Dining Philosophers" msgstr "哲学家就餐问题 (Dining philosophers problem)" #: src/SUMMARY.md:284 src/exercises/concurrency/link-checker.md:1 msgid "Multi-threaded Link Checker" msgstr "多线程链接检查器" #: src/SUMMARY.md:286 msgid "Concurrency: Afternoon" msgstr "并发:下午" #: src/SUMMARY.md:288 msgid "Async Basics" msgstr "异步基础" #: src/SUMMARY.md:289 msgid "async/await" msgstr "async/await" #: src/SUMMARY.md:290 src/async/futures.md:1 msgid "Futures" msgstr "Futures" #: src/SUMMARY.md:291 src/async/runtimes.md:1 msgid "Runtimes" msgstr "Runtimes" #: src/SUMMARY.md:292 src/async/runtimes/tokio.md:1 msgid "Tokio" msgstr "Tokio" #: src/SUMMARY.md:293 src/exercises/concurrency/link-checker.md:126 #: src/async/tasks.md:1 src/exercises/concurrency/chat-app.md:143 msgid "Tasks" msgstr "任务" #: src/SUMMARY.md:294 src/async/channels.md:1 msgid "Async Channels" msgstr "异步通道" #: src/SUMMARY.md:296 src/async/control-flow/join.md:1 msgid "Join" msgstr "加入" #: src/SUMMARY.md:297 src/async/control-flow/select.md:1 msgid "Select" msgstr "选择" #: src/SUMMARY.md:298 msgid "Pitfalls" msgstr "误区" #: src/SUMMARY.md:299 msgid "Blocking the Executor" msgstr "屏蔽执行器" #: src/SUMMARY.md:300 src/async/pitfalls/pin.md:1 msgid "Pin" msgstr "固定" #: src/SUMMARY.md:301 src/async/pitfalls/async-traits.md:1 msgid "Async Traits" msgstr "异步特质" #: src/SUMMARY.md:302 src/async/pitfalls/cancellation.md:1 #, fuzzy msgid "Cancellation" msgstr "安装" #: src/SUMMARY.md:305 src/exercises/concurrency/chat-app.md:1 #: src/exercises/concurrency/solutions-afternoon.md:95 msgid "Broadcast Chat Application" msgstr "广播聊天应用程序" #: src/SUMMARY.md:308 msgid "Final Words" msgstr "结束语" #: src/SUMMARY.md:312 src/thanks.md:1 msgid "Thanks!" msgstr "谢谢!" #: src/SUMMARY.md:313 msgid "Other Resources" msgstr "其他资源" #: src/SUMMARY.md:314 src/credits.md:1 msgid "Credits" msgstr "鸣谢" #: src/SUMMARY.md:317 src/exercises/solutions.md:1 msgid "Solutions" msgstr "解答" #: src/SUMMARY.md:322 msgid "Day 1 Morning" msgstr "第一天上午" #: src/SUMMARY.md:323 msgid "Day 1 Afternoon" msgstr "第一天下午" #: src/SUMMARY.md:324 msgid "Day 2 Morning" msgstr "第二天上午" #: src/SUMMARY.md:325 msgid "Day 2 Afternoon" msgstr "第二天下午" #: src/SUMMARY.md:326 msgid "Day 3 Morning" msgstr "第三天上午" #: src/SUMMARY.md:327 msgid "Day 3 Afternoon" msgstr "第三天下午" #: src/SUMMARY.md:328 msgid "Bare Metal Rust Morning" msgstr "嵌入式 Rust:入门篇" #: src/SUMMARY.md:329 src/exercises/bare-metal/solutions-afternoon.md:1 msgid "Bare Metal Rust Afternoon" msgstr "嵌入式 Rust:进阶篇" #: src/SUMMARY.md:330 msgid "Concurrency Morning" msgstr "并发编程:入门篇" #: src/SUMMARY.md:331 msgid "Concurrency Afternoon" msgstr "并发编程:进阶篇" #: src/index.md:3 #, fuzzy msgid "" "[![Build workflow](https://img.shields.io/github/actions/workflow/status/" "google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/" "google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!" "[GitHub contributors](https://img.shields.io/github/contributors/google/" "comprehensive-rust?style=flat-square)](https://github.com/google/" "comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields." "io/github/stars/google/comprehensive-rust?style=flat-square)](https://github." "com/google/comprehensive-rust/stargazers)" msgstr "" "[![构建工作流](https://img.shields.io/github/actions/workflow/status/google/" "comprehensive-rust/build.yml?style=flat-square)](https://github.com/google/" "comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!" "[GitHub 贡献者](https://img.shields.io/github/contributors/google/" "comprehensive-rust?style=flat-square)](https://github.com/google/" "comprehensive-rust/graphs/contributors)" #: src/index.md:7 msgid "" "This is a free Rust course developed by the Android team at Google. The " "course covers the full spectrum of Rust, from basic syntax to advanced " "topics like generics and error handling." msgstr "" "这是由 Android 团队开发的免费 Rust 课程。该课程涵盖了 Rust 的全部范围,从基本" "语法到高级主题如泛型和错误处理。" #: src/index.md:11 msgid "" "The latest version of the course can be found at . If you are reading somewhere else, please check there " "for updates." msgstr "" "如需查看课程的最新版本,请访问 。如果您是在其他地方阅读,请查看这个网址了解是否有更新。" #: src/index.md:15 msgid "" "The goal of the course is to teach you Rust. We assume you don't know " "anything about Rust and hope to:" msgstr "本课程的目标是教授你 Rust。我们假设你对 Rust 一无所知,并希望能够:" #: src/index.md:18 msgid "Give you a comprehensive understanding of the Rust syntax and language." msgstr "帮助你全面理解 Rust 的语法和语言。" #: src/index.md:19 msgid "Enable you to modify existing programs and write new programs in Rust." msgstr "使你能够修改现有的程序并用 Rust 编写新程序。" #: src/index.md:20 msgid "Show you common Rust idioms." msgstr "展示常见的 Rust 习语。" #: src/index.md:22 msgid "We call the first three course days Rust Fundamentals." msgstr "我们将前三天的课程称为`Rust 基础知识`。" #: src/index.md:24 msgid "" "Building on this, you're invited to dive into one or more specialized topics:" msgstr "在此基础上,你可以选择深入学习一个或多个专门的主题:" #: src/index.md:26 msgid "" "[Android](android.md): a half-day course on using Rust for Android platform " "development (AOSP). This includes interoperability with C, C++, and Java." msgstr "" "[Android](android.md):一个半天的课程,介绍如何在 Android 平台开发中使用 " "Rust(AOSP)。课程内容包括与 C、C++ 和 Java 的互操作性。" #: src/index.md:28 msgid "" "[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal " "(embedded) development. Both microcontrollers and application processors are " "covered." msgstr "" "[Bare-metal](bare-metal.md):为期一天的课程,介绍如何使用 Rust 进行裸机(嵌入式)" "开发。课程内容涵盖微控制器和应用处理器。" #: src/index.md:31 #, fuzzy msgid "" "[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We " "cover both classical concurrency (preemptively scheduling using threads and " "mutexes) and async/await concurrency (cooperative multitasking using " "futures)." msgstr "" "[并发](concurrency.md):一天的课程,介绍 Rust 中的并发性。我们将涵盖传统并发(使" "用线程和互斥锁进行抢占式调度)和 async/await 并发(使用 futures 进行协作式多任" "务处理)。" #: src/index.md:37 msgid "Non-Goals" msgstr "非目标" #: src/index.md:39 msgid "" "Rust is a large language and we won't be able to cover all of it in a few " "days. Some non-goals of this course are:" msgstr "" "Rust 是一门庞大的语言,我们无法在几天内涵盖所有内容。本课程的一些非目标包括:" #: src/index.md:42 #, fuzzy msgid "" "Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]" "(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]" "(https://doc.rust-lang.org/rust-by-example/macros.html) instead." msgstr "" "了解如何开发宏,请参阅[本书中的第 19.5 章](https://doc.rust-lang.org/book/" "ch19-06-macros.html)和 [Rust by Examples](https://doc.rust-lang.org/rust-by-" "example/macros.html)。" #: src/index.md:46 msgid "Assumptions" msgstr "前提假设" #: src/index.md:48 #, fuzzy msgid "" "The course assumes that you already know how to program. Rust is a " "statically-typed language and we will sometimes make comparisons with C and " "C++ to better explain or contrast the Rust approach." msgstr "" "本课程假设你已经具备编程知识。Rust 是一种静态类型语言,我们有时会与 C 和 C++ " "进行比较,以更好地解释或对比 Rust 的方法。" #: src/index.md:52 #, fuzzy msgid "" "If you know how to program in a dynamically-typed language such as Python or " "JavaScript, then you will be able to follow along just fine too." msgstr "" "如果你已经了解如 Python 或 JavaScript 等动态类型语言的编程,那么你也能够很好地" "跟上本课程。" #: src/index.md:57 #, fuzzy msgid "" "This is an example of a _speaker note_. We will use these to add additional " "information to the slides. This could be key points which the instructor " "should cover as well as answers to typical questions which come up in class." msgstr "" "这是演讲者备注的示例。我们将使用这些备注来为幻灯片添加额外的信息。这可能包括" "讲师应该涵盖的关键点,以及课堂上常见问题的答案。" #: src/running-the-course.md:3 src/running-the-course/course-structure.md:3 msgid "This page is for the course instructor." msgstr "本页面适用于课程教师。" #: src/running-the-course.md:5 msgid "" "Here is a bit of background information about how we've been running the " "course internally at Google." msgstr "以下是有关 Google 内部授课方式的一些背景信息。" #: src/running-the-course.md:8 msgid "" "We typically run classes from 10:00 am to 4:00 pm, with a 1 hour lunch break " "in the middle. This leaves 2.5 hours for the morning class and 2.5 hours for " "the afternoon class. Note that this is just a recommendation: you can also " "spend 3 hour on the morning session to give people more time for exercises. " "The downside of longer session is that people can become very tired after 6 " "full hours of class in the afternoon." msgstr "" "上课时间通常是从上午 10:00 到下午 4:00,中间有 1 小时的午餐休息时间。这样,上午" "和下午各留了 2.5 小时的上课时间。请注意,这仅是建议:您也可以上午上课 3 小时,让" "学员有更多的时间进行练习。上课时间较长的缺点是,学员上了整整 6 小时的课,到了下" "午可能会非常疲倦。" #: src/running-the-course.md:16 msgid "Before you run the course, you will want to:" msgstr "在授课之前,你需要完成以下事项:" #: src/running-the-course.md:18 msgid "" "Make yourself familiar with the course material. We've included speaker " "notes to help highlight the key points (please help us by contributing more " "speaker notes!). When presenting, you should make sure to open the speaker " "notes in a popup (click the link with a little arrow next to \"Speaker " "Notes\"). This way you have a clean screen to present to the class." msgstr "" "熟悉课程资料。我们添加了演讲者备注,借此强调要点(请帮个忙,多多贡献演讲者备" "注!)。演示幻灯片时,你应确保在弹出式窗口中打开演讲者备注(点击对应的链接,在`演" "讲者备注`旁边有一个小箭头)。这样,你就可以确保屏幕整洁有序,更好地向全班学员展" "示课程内容。" #: src/running-the-course.md:24 msgid "" "Decide on the dates. Since the course takes at least three full days, we " "recommend that you schedule the days over two weeks. Course participants " "have said that they find it helpful to have a gap in the course since it " "helps them process all the information we give them." msgstr "" "确定培训日期。由于本课程至少需要三天的时间,因此我们建议你安排两周以上的时间。" "课程学员曾表示,在每堂课之间留一段间隔会很有帮助,因为这有利于他们吸收我们所提" "供的所有信息。" #: src/running-the-course.md:29 msgid "" "Find a room large enough for your in-person participants. We recommend a " "class size of 15-25 people. That's small enough that people are comfortable " "asking questions --- it's also small enough that one instructor will have " "time to answer the questions. Make sure the room has _desks_ for yourself " "and for the students: you will all need to be able to sit and work with your " "laptops. In particular, you will be doing a lot of live-coding as an " "instructor, so a lectern won't be very helpful for you." msgstr "" "找一间足以容纳全体线下学员的大教室。我们建议你将课程人数控制在 15-25 人之间。" "这样,人数足够少,不仅便于学员提问问题,配备的一位教师也有时间答疑解惑。确保教室" "备有供你和学生使用的`课桌`:你们都需要能够坐下来并操作各自的笔记本电脑。特别是" "身为教师,你现场要进行大量编码,所以讲台对你来说用处不大。" #: src/running-the-course.md:37 msgid "" "On the day of your course, show up to the room a little early to set things " "up. We recommend presenting directly using `mdbook serve` running on your " "laptop (see the [installation instructions](https://github.com/google/" "comprehensive-rust#building)). This ensures optimal performance with no lag " "as you change pages. Using your laptop will also allow you to fix typos as " "you or the course participants spot them." msgstr "" "在开课当天,请提前一点到教室,设置好教学设备。我们建议你直接在笔记本电脑上运行 " "`mdbook serve` 来演示课程内容(请参阅[安装说明](https://github.com/google/" "comprehensive-rust#building))。这样可以确保你在切换页面时没有延迟,演示效果更" "好。当你或课程学员发现拼写错误时,你也可以使用笔记本电脑及时更正。" #: src/running-the-course.md:43 msgid "" "Let people solve the exercises by themselves or in small groups. We " "typically spend 30-45 minutes on exercises in the morning and in the " "afternoon (including time to review the solutions). Make sure to ask people " "if they're stuck or if there is anything you can help with. When you see " "that several people have the same problem, call it out to the class and " "offer a solution, e.g., by showing people where to find the relevant " "information in the standard library." msgstr "" "让学员采取小组形式或独立解题。通常,我们会在上午和下午各安排 30-45 分钟的练习" "时间(包括查看解决方案的时间)。请务必询问学员是否遇到困难,或是否需要任何帮助。" "如果你看到多位学员遇到同样的问题,请在班级集体进行讲解,并提供相应的解决方案,例" "如告诉大家在标准库的什么位置可以找到相关信息。" #: src/running-the-course.md:51 msgid "" "That is all, good luck running the course! We hope it will be as much fun " "for you as it has been for us!" msgstr "今天的分享就是这些,祝你授课顺利!希望你和我们一样,乐在其中!" #: src/running-the-course.md:54 msgid "" "Please [provide feedback](https://github.com/google/comprehensive-rust/" "discussions/86) afterwards so that we can keep improving the course. We " "would love to hear what worked well for you and what can be made better. " "Your students are also very welcome to [send us feedback](https://github.com/" "google/comprehensive-rust/discussions/100)!" msgstr "" "欢迎你课后[提供反馈](https://github.com/google/comprehensive-rust/" "discussions/86),帮助我们不断改进课程。我们非常期待了解哪些方面做得不错,哪些方" "面还需要改进。同时非常欢迎学生们[向我们发送反馈](https://github.com/google/" "comprehensive-rust/discussions/100)!" #: src/running-the-course/course-structure.md:5 msgid "Rust Fundamentals" msgstr "Rust 二进制文件" #: src/running-the-course/course-structure.md:7 msgid "" "The first three days make up [Rust Fundaments](../welcome-day-1.md). The " "days are fast paced and we cover a lot of ground:" msgstr "" "我们会在头三天介绍 [Rust 基础知识](../welcome-day-1.md)。这几天的步调会稍快," "因为我们要探讨许多层面:" #: src/running-the-course/course-structure.md:10 msgid "Day 1: Basic Rust, syntax, control flow, creating and consuming values." msgstr "第 1 天:Rust 基础知识、语法、控制流、创建和使用值。" #: src/running-the-course/course-structure.md:11 #, fuzzy msgid "" "Day 2: Memory management, ownership, compound data types, and the standard " "library." msgstr "第 2 天:复合数据类型、模式匹配和标准库。" #: src/running-the-course/course-structure.md:12 #, fuzzy msgid "Day 3: Generics, traits, error handling, testing, and unsafe Rust." msgstr "第 3 天:trait 和泛型、错误处理、测试和不安全 Rust。" #: src/running-the-course/course-structure.md:14 msgid "Deep Dives" msgstr "深入探究" #: src/running-the-course/course-structure.md:16 msgid "" "In addition to the 3-day class on Rust Fundamentals, we cover some more " "specialized topics:" msgstr "除了为期 3 天的`Rust 基础知识`课程外,我们还推出了一些专题课程:" #: src/running-the-course/course-structure.md:19 #, fuzzy msgid "Rust in Android" msgstr "欢迎来到Android 中的Rust" #: src/running-the-course/course-structure.md:21 #, fuzzy msgid "" "The [Rust in Android](../android.md) deep dive is a half-day course on using " "Rust for Android platform development. This includes interoperability with " "C, C++, and Java." msgstr "" "`[深入探究 Android](../android.md)`课程为期半天,旨在介绍如何使用 Rust 进行 " "Android 平台开发。其中包括与 C、C++ 和 Java 的互操作性。" #: src/running-the-course/course-structure.md:25 msgid "" "You will need an [AOSP checkout](https://source.android.com/docs/setup/" "download/downloading). Make a checkout of the [course repository](https://" "github.com/google/comprehensive-rust) on the same machine and move the `src/" "android/` directory into the root of your AOSP checkout. This will ensure " "that the Android build system sees the `Android.bp` files in `src/android/`." msgstr "" "你将需要[签出 AOSP](https://source.android.com/docs/setup/download/" "downloading)。在同一机器上签出[课程库](https://github.com/google/" "comprehensive-rust), 然后将 `src/android/` 目录移至所签出的 AOSP 的根目录。这" "将确保 Android 构建系统能检测到 `src/android/` 中的 `Android.bp` 文件。" #: src/running-the-course/course-structure.md:30 msgid "" "Ensure that `adb sync` works with your emulator or real device and pre-build " "all Android examples using `src/android/build_all.sh`. Read the script to " "see the commands it runs and make sure they work when you run them by hand." msgstr "" "确保 `adb sync` 适用于你的模拟器或实际设备, 并使用 `src/android/build_all." "sh` 预构建所有 Android 示例。请阅读脚本, 查看它所运行的命令,并确保这些命令能" "在你手动运行时正确执行。" #: src/running-the-course/course-structure.md:37 #, fuzzy msgid "Bare-Metal Rust" msgstr "裸机" #: src/running-the-course/course-structure.md:39 #, fuzzy msgid "" "The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on " "using Rust for bare-metal (embedded) development. Both microcontrollers and " "application processors are covered." msgstr "" "`[深入探究裸机](../bare-metal.md)`课程为期一天,旨在介绍如何使用 Rust 进行裸机" "(嵌入式)开发。其中涵盖了微控制器和应用 处理器。" #: src/running-the-course/course-structure.md:43 msgid "" "For the microcontroller part, you will need to buy the [BBC micro:bit]" "(https://microbit.org/) v2 development board ahead of time. Everybody will " "need to install a number of packages as described on the [welcome page](../" "bare-metal.md)." msgstr "" "对于微控制器部分,你需要提前购买 [BBC micro:bit](https://microbit.org/) 第 2 " "版开发板。每个人都需要安装多个软件包, 具体如[欢迎页面](../bare-metal.md)中所" "述。" #: src/running-the-course/course-structure.md:48 msgid "Concurrency in Rust" msgstr "欢迎了解 Rust 中的并发" #: src/running-the-course/course-structure.md:50 msgid "" "The [Concurrency in Rust](../concurrency.md) deep dive is a full day class " "on classical as well as `async`/`await` concurrency." msgstr "" "`[深入探究并发](../concurrency.md)`课程为期一天,旨在介绍传统并发和 `async`/" "`await` 并发。" #: src/running-the-course/course-structure.md:53 msgid "" "You will need a fresh crate set up and the dependencies downloaded and ready " "to go. You can then copy/paste the examples into `src/main.rs` to experiment " "with them:" msgstr "" "你需要设置一个新 crate,下载所需的依赖项, 做好课前准备。然后,你可以将示例复制/" "粘贴到 `src/main.rs` 中, 以便对以下代码进行实验:" #: src/running-the-course/course-structure.md:64 msgid "Format" msgstr "课程形式" #: src/running-the-course/course-structure.md:66 msgid "" "The course is meant to be very interactive and we recommend letting the " "questions drive the exploration of Rust!" msgstr "本课程的互动性非常强, 建议你以问题驱动探索 Rust!" #: src/running-the-course/keyboard-shortcuts.md:3 msgid "There are several useful keyboard shortcuts in mdBook:" msgstr "mdBook 中有一些实用键盘快捷键:" #: src/running-the-course/keyboard-shortcuts.md:5 msgid "Arrow-Left" msgstr "向左箭头" #: src/running-the-course/keyboard-shortcuts.md:5 msgid ": Navigate to the previous page." msgstr ":转到上一页。" #: src/running-the-course/keyboard-shortcuts.md:6 msgid "Arrow-Right" msgstr "向右箭头" #: src/running-the-course/keyboard-shortcuts.md:6 msgid ": Navigate to the next page." msgstr ":转到下一页。" #: src/running-the-course/keyboard-shortcuts.md:7 src/cargo/code-samples.md:19 msgid "Ctrl + Enter" msgstr "Ctrl + Enter" #: src/running-the-course/keyboard-shortcuts.md:7 msgid ": Execute the code sample that has focus." msgstr ":执行具有焦点的代码示例。" #: src/running-the-course/keyboard-shortcuts.md:8 msgid "s" msgstr "s" #: src/running-the-course/keyboard-shortcuts.md:8 msgid ": Activate the search bar." msgstr ":激活搜索栏。" #: src/running-the-course/translations.md:3 msgid "" "The course has been translated into other languages by a set of wonderful " "volunteers:" msgstr "一批优秀的志愿者已将本课程翻译成其他语言:" #: src/running-the-course/translations.md:6 msgid "" "[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) " "by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github." "com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and " "[@henrif75](https://github.com/henrif75)." msgstr "" "[巴西葡萄牙语版本](https://google.github.io/comprehensive-rust/pt-BR/)译者:" "[@rastringer](https://github.com/rastringer)、[@hugojacob](https://github." "com/hugojacob)、[@joaovicmendes](https://github.com/joaovicmendes) 和 " "[@henrif75](https://github.com/henrif75)。" #: src/running-the-course/translations.md:7 msgid "" "[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]" "(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), and " "[@jooyunghan](https://github.com/jooyunghan)." msgstr "" "[韩语版本](https://google.github.io/comprehensive-rust/ko/)译者:[@keispace]" "(https://github.com/keispace)、[@jiyongp](https://github.com/jiyongp) 和 " "[@jooyunghan](https://github.com/jooyunghan)。" #: src/running-the-course/translations.md:8 msgid "" "[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]" "(https://github.com/deavid)." msgstr "" #: src/running-the-course/translations.md:10 msgid "" "Use the language picker in the top-right corner to switch between languages." msgstr "使用右上角的语言选择器切换语言。" #: src/running-the-course/translations.md:12 msgid "Incomplete Translations" msgstr "未完成的翻译" #: src/running-the-course/translations.md:14 msgid "" "There is a large number of in-progress translations. We link to the most " "recently updated translations:" msgstr "多数语言版本仍在翻译中。我们会提供最近更新的翻译的链接:" #: src/running-the-course/translations.md:17 msgid "" "[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]" "(https://github.com/raselmandol)." msgstr "" "[孟加拉语版本](https://google.github.io/comprehensive-rust/bn/)译者:" "[@raselmandol](https://github.com/raselmandol)。" #: src/running-the-course/translations.md:18 msgid "" "[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) " "by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/" "victorhsieh), [@mingyc](https://github.com/mingyc), and [@johnathan79717]" "(https://github.com/johnathan79717)." msgstr "" #: src/running-the-course/translations.md:19 msgid "" "[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) " "by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/" "wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/" "kongy), [@noahdragon](https://github.com/noahdragon), and [@superwhd]" "(https://github.com/superwhd)." msgstr "" #: src/running-the-course/translations.md:20 msgid "" "[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]" "(https://github.com/KookaS) and [@vcaen](https://github.com/vcaen)." msgstr "" "[法语版本](https://google.github.io/comprehensive-rust/fr/)译者:[@KookaS]" "(https://github.com/KookaS) 和 [@vcaen](https://github.com/vcaen)。" #: src/running-the-course/translations.md:21 msgid "" "[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]" "(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw)." msgstr "" "[德语版本](https://google.github.io/comprehensive-rust/de/)译者:[@Throvn]" "(https://github.com/Throvn) 和 [@ronaldfw](https://github.com/ronaldfw)。" #: src/running-the-course/translations.md:22 msgid "" "[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]" "(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/" "momotaro1105)." msgstr "" "[日语版本](https://google.github.io/comprehensive-rust/ja/)译者:[@CoinEZ-JPN]" "(https://github.com/CoinEZ) 和 [@momotaro1105](https://github.com/" "momotaro1105)。" #: src/running-the-course/translations.md:24 msgid "" "If you want to help with this effort, please see [our instructions](https://" "github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to " "get going. Translations are coordinated on the [issue tracker](https://" "github.com/google/comprehensive-rust/issues/282)." msgstr "" "如果你想帮助我们,请参阅[我们的说明](htts://github.com/google/comprehensive-" "rust/blob/main/TRANSLATIONS.md),了解如何开始翻译。翻译工作将通过[问题跟踪器]" "(https://github.com/google/comprehensive-rust/issues/282)." #: src/cargo.md:3 msgid "" "When you start reading about Rust, you will soon meet [Cargo](https://doc." "rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build " "and run Rust applications. Here we want to give a brief overview of what " "Cargo is and how it fits into the wider ecosystem and how it fits into this " "training." msgstr "" "开始了解 Rust 后,你很快就会遇到 [Cargo](https://doc.rust-lang.org/cargo/),这" "是 Rust 生态系统中 用于构建和运行 Rust 应用的标准工具。在这里,我们希望 简要介" "绍一下什么是 Cargo,它如何融入更广泛的生态系统, 以及我们如何在本培训中合理利" "用 Cargo。" #: src/cargo.md:8 msgid "Installation" msgstr "安装" #: src/cargo.md:10 msgid "**Please follow the instructions on .**" msgstr "**请按照 上的说明操作。**" #: src/cargo.md:12 msgid "" "This will give you the Cargo build tool (`cargo`) and the Rust compiler " "(`rustc`). You will also get `rustup`, a command line utility that you can " "use to install to different compiler versions." msgstr "" "这将为你提供 Cargo 构建工具 (`cargo`)和 Rust 编译器 (`rustc`)。你还将获得 " "`rustup`,这是一个命令行实用程序,你可以用它来安装不同的编译器版本。" #: src/cargo.md:14 msgid "" "After installing Rust, you should configure your editor or IDE to work with " "Rust. Most editors do this by talking to [rust-analyzer](https://rust-" "analyzer.github.io/), which provides auto-completion and jump-to-definition " "functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://" "rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-" "analyzer.github.io/manual.html#vimneovim), and many others. There is also a " "different IDE available called [RustRover](https://www.jetbrains.com/rust/)." msgstr "" #: src/cargo.md:18 msgid "" "On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust " "formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this " "gets you an outdated rust version and may lead to unexpected behavior. The " "command would be:" msgstr "" "在 Debian/Ubuntu 上,你也可以通过 `apt` 安装 Cargo、Rust 源代码和 [Rust 格式设" "置工具](https://github.com/rust-lang/rustfmt)。但是,这样会得到一个过时的 " "Rust 版本,可能会导致意外的行为。命令如下:" #: src/cargo/rust-ecosystem.md:1 msgid "The Rust Ecosystem" msgstr "Rust 生态系统" #: src/cargo/rust-ecosystem.md:3 msgid "" "The Rust ecosystem consists of a number of tools, of which the main ones are:" msgstr "Rust 生态系统由许多工具组成,其中的主要工具包括:" #: src/cargo/rust-ecosystem.md:5 msgid "" "`rustc`: the Rust compiler which turns `.rs` files into binaries and other " "intermediate formats." msgstr "`rustc`:Rust 编译器,可将 `.rs` 文件转换为二进制文件和其他 中间格式。" #: src/cargo/rust-ecosystem.md:8 msgid "" "`cargo`: the Rust dependency manager and build tool. Cargo knows how to " "download dependencies, usually hosted on , and it will " "pass them to `rustc` when building your project. Cargo also comes with a " "built-in test runner which is used to execute unit tests." msgstr "" "`cargo`:Rust 依赖项管理器和构建工具。Cargo 知道如何 下载托管在 上的依赖项,并在构建项目时将它们 传递给 `rustc`。Cargo 还附带一个内" "置的 测试运行程序,用于执行单元测试。" #: src/cargo/rust-ecosystem.md:13 msgid "" "`rustup`: the Rust toolchain installer and updater. This tool is used to " "install and update `rustc` and `cargo` when new versions of Rust is " "released. In addition, `rustup` can also download documentation for the " "standard library. You can have multiple versions of Rust installed at once " "and `rustup` will let you switch between them as needed." msgstr "" "`rustup`:Rust 工具链安装程序和更新程序。发布新版本 Rust 时,此工具用于 安装并" "更新 `rustc` 和 `cargo`。 此外,`rustup` 还可以下载标准 库的文档。你可以同时安" "装多个版本的 Rust,并且 `rustup` 可让你根据需要在这些版本之间切换。" #: src/cargo/rust-ecosystem.md:21 src/hello-world.md:25 #: src/hello-world/small-example.md:27 src/why-rust/runtime.md:10 #: src/why-rust/modern.md:21 src/basic-syntax/compound-types.md:30 #: src/basic-syntax/references.md:23 #: src/pattern-matching/destructuring-enums.md:35 #: src/ownership/double-free-modern-cpp.md:55 #: src/error-handling/try-operator.md:48 #: src/error-handling/converting-error-types-example.md:50 #: src/concurrency/threads.md:30 src/async/async-await.md:25 msgid "Key points:" msgstr "关键点:" #: src/cargo/rust-ecosystem.md:23 msgid "" "Rust has a rapid release schedule with a new release coming out every six " "weeks. New releases maintain backwards compatibility with old releases --- " "plus they enable new functionality." msgstr "" "Rust 有一个快速发布时间表,每六周就会发布一次 新版本。新版本保持与 旧版本的向" "后兼容性,还添加了新功能。" #: src/cargo/rust-ecosystem.md:27 #, fuzzy msgid "" "There are three release channels: \"stable\", \"beta\", and \"nightly\"." msgstr "共有三个发布阶段:`稳定版``Beta 版`和`夜间版`。" #: src/cargo/rust-ecosystem.md:29 #, fuzzy msgid "" "New features are being tested on \"nightly\", \"beta\" is what becomes " "\"stable\" every six weeks." msgstr "我们会在`夜间版`上测试新功能,每六周将`Beta 版`升级为 `稳定版`。" #: src/cargo/rust-ecosystem.md:32 msgid "" "Dependencies can also be resolved from alternative [registries](https://doc." "rust-lang.org/cargo/reference/registries.html), git, folders, and more." msgstr "" "您也可以通过备用的[注册数据库](https://doc.rust-lang.org/cargo/reference/" "registries.html)、git、文件夹等资源来解析依赖项。" #: src/cargo/running-locally.md:15 msgid "" "You can use any later version too since Rust maintains backwards " "compatibility." msgstr "您也可以使用任何更高版本,因为 Rust 保持向后兼容性。" #: src/cargo/running-locally.md:17 msgid "" "With this in place, follow these steps to build a Rust binary from one of " "the examples in this training:" msgstr "" "了解这些信息后,请按照以下步骤从本培训中的 一个示例中构建 Rust 二进制文件:" #: src/cargo/running-locally.md:20 msgid "Click the \"Copy to clipboard\" button on the example you want to copy." msgstr "在你要复制的示例上点击`复制到剪贴板`按钮。" #: src/cargo/running-locally.md:22 msgid "" "Use `cargo new exercise` to create a new `exercise/` directory for your code:" msgstr "使用 `cargo new exercise` 为你的代码新建一个 `exercise/` 目录:" #: src/cargo/running-locally.md:29 msgid "" "Navigate into `exercise/` and use `cargo run` to build and run your binary:" msgstr "导航至 `exercise/` 并使用 `cargo run` 构建并运行你的二进制文件:" #: src/cargo/running-locally.md:40 msgid "" "Replace the boiler-plate code in `src/main.rs` with your own code. For " "example, using the example on the previous page, make `src/main.rs` look like" msgstr "" "将 `src/main.rs` 中的样板代码替换为你自己的代码。例如, 使用上一页中的示例,将 " "`src/main.rs` 改为:" #: src/cargo/running-locally.md:43 msgid "" "```rust\n" "fn main() {\n" " println!(\"Edit me!\");\n" "}\n" "```" msgstr "" "```rust\n" "fn main() {\n" " println!(\"Edit me!\");\n" "}\n" "```" #: src/cargo/running-locally.md:49 msgid "Use `cargo run` to build and run your updated binary:" msgstr "使用 `cargo run` 构建并运行你更新后的二进制文件:" #: src/cargo/running-locally.md:59 msgid "" "Use `cargo check` to quickly check your project for errors, use `cargo " "build` to compile it without running it. You will find the output in `target/" "debug/` for a normal debug build. Use `cargo build --release` to produce an " "optimized release build in `target/release/`." msgstr "" "使用 `cargo check` 快速检查项目是否存在错误;使用 `cargo build` 只进行编译,而" "不运行。你可以在 `target/debug/` 中找到常规调试 build 的输出。使用 `cargo " "build --release` 在 `target/release/` 中生成经过优化的 发布 build。" #: src/cargo/running-locally.md:64 msgid "" "You can add dependencies for your project by editing `Cargo.toml`. When you " "run `cargo` commands, it will automatically download and compile missing " "dependencies for you." msgstr "" "你可以通过修改 `Cargo.toml` 为项目添加依赖项。当你 运行 `cargo` 命令时,系统会" "自动为你下载和编译缺失 的依赖项。" #: src/cargo/running-locally.md:72 msgid "" "Try to encourage the class participants to install Cargo and use a local " "editor. It will make their life easier since they will have a normal " "development environment." msgstr "" "尽量鼓励全班学员安装 Cargo 并使用 本地编辑器。这能为他们营造常规 开发环境,让" "工作变得更加轻松。"