Comprehensive Rust(Ukrainian) 202412271 XI Залізо: Ранок 272 48 Ласкаво просимо до Rust на голому залізі 273 49 no_std 275 49.1 Мінімальна програма no_std . . . . . . . . . . . . . . . . . . . . . . . . . 276 49.2 alloc . . . . . . . • println!(format, ..) виводить рядок у стандартний вивід, застосовуючи форматування, описане у std::fmt. • format!(format, ..) працює так само, як println!, але повертає результат у вигляді рядка. програмістів на C++: думайте про &str як про std::string_view з C++, але такий, що завжди вказує на дійсний рядок у пам'яті. Rust String є приблизним еквівалентом std::string з C++ (головна відмінність: він0 码力 | 396 页 | 1.08 MB | 11 月前3
Comprehensive Rust(Persian ) 202412Bare Metal : � � � 270 49 � � Bare Metal Rust � � � � � � � � 271 50 no_std 273 50.1 � � � � � � � � � � � � � � � � no_std . . . . . . . . . . . . . . . . . . . . . . . . . . 274 50.2 alloc . . . � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � ] std::fmt] (https://doc.rust-lang.org/std/fmt/index.html ( � � � � � � � � � � � � . . • format!(format , . . ( � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � . � � � � � � � String � � � � � � � � � � � std::string � � C + + � � � ) � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �0 码力 | 393 页 | 987.97 KB | 11 月前3
Comprehensive Rust ?Exercise Solutions 257 XI Bare Metal: Morning 258 49 Welcome to Bare Metal Rust 259 50 no_std 260 50.1 A minimal no_std program . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 50.2 alloc . . . . macros. • println!(format, ..) prints a line to standard output, applying formatting de- scribed in std::fmt. • format!(format, ..) works just like println! but returns the result as a string. • dbg!(expression) For C++ programmers: think of &str as std::string_view from C++, but the one that always points to a valid string in memory. Rust String is a rough equivalent of std::string from C++ (main difference: it0 码力 | 378 页 | 1009.46 KB | 1 年前3
Comprehensive Rust(English) 202412Exercise Solutions 262 XI Bare Metal: Morning 263 48 Welcome to Bare Metal Rust 264 49 no_std 266 49.1 A minimal no_std program . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 49.2 alloc . . . . macros. • println!(format, ..) prints a line to standard output, applying formatting de- scribed in std::fmt. • format!(format, ..) works just like println! but returns the result as a string. • dbg!(expression) For C++ programmers: think of &str as std::string_view from C++, but the one that always points to a valid string in memory. Rust String is a rough equivalent of std::string from C++ (main difference: it0 码力 | 382 页 | 1.00 MB | 11 月前3
Comprehensive Rust(简体中文) 202412Together — Exercise 243 48 练习解答 244 XI 裸机:上午 245 49 Welcome to Bare Metal Rust 246 50 no_std 247 50.1 极小的 no_std 程序 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 50.2 alloc . . . 准库包含各种有用的宏。 • println!(format, ..) prints a line to standard output, applying formatting described in std::fmt. • format!(format, ..) 的用法与 println! 类似,但它以字符串形式返回结果。 • dbg!(expression) 会记录表达式的值并返回该值。 • todo For C++ programmers: think of &str as std::string_view from C++, but the one that always points to a valid string in memory. Rust String is a rough equivalent of std::string from C++ (main difference: it0 码力 | 359 页 | 1.33 MB | 11 月前3
Comprehensive Rust(Español) 202412265 XI Bare Metal: mañana 266 49 Te damos la bienvenida a Bare Metal Rust 267 50 no_std 269 50.1 Un programa no_std mínimo . . . . . . . . . . . . . . . . . . . . . . . . . . 270 50.2 alloc . . . . . ..) imprime una linea a la salida estándar (”standard output”), aplicando el formato descrito en std::fmt. • format!(format, ..) funciona igual que println!, pero devuelve el resultado en forma de cadena C++, pero uno que siempre apunta a una cadena válida en la memoria. El String de Rust es parecido a std::string de C++ (la diferencia principal es que solo puede contener bytes codificados en UTF-8 y nunca0 码力 | 389 页 | 1.04 MB | 11 月前3
Comprehensive Rust(Português do Brasil) 202412Exercícios 266 XI Bare Metal: Manhã 267 49 Bem-vindos ao Rust Bare Metal 268 50 no_std 270 50.1 Um programa no_std mínimo . . . . . . . . . . . . . . . . . . . . . . . . . 271 50.2 alloc . . . . . . úteis. • println!(format, ..) imprime uma linha na saída padrão, aplicando a formatação descrita em std::fmt. • format!(format, ..) funciona exatamente como println!, mas retorna o resultado como uma string que sempre aponta para uma string válida na memória. Em Rust, String é um equivalente aproximado de std::string de C++ (principal diferença: ele só pode conter bytes codificados em UTF-8 e nunca usará uma0 码力 | 389 页 | 1.05 MB | 11 月前3
Comprehensive Rust(繁体中文). 242 47 融會貫通 - 練習 243 48 練習題的參考答案 244 XI 裸機開發:上午 245 49 歡迎瞭解 Rust 裸機開發 246 50 no_std 247 50.1 最簡單的 no_std 程式 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 50.2 alloc . . . 標準程式庫包含各式實用巨集。 • println!(format, ..) prints a line to standard output, applying formatting described in std::fmt. • format!(format, ..) 的運作方式與 println! 類似,但會以字串形式傳回結果。 • dbg!(expression) 會記錄並傳回運算式的值。 • todo 等於size_of::0 码力 | 358 页 | 1.41 MB | 11 月前3
Comprehensive Rust(繁体中文) 202406. 240 47 融會貫通 - 練習 241 48 練習題的參考答案 242 XI 裸機開發:上午 243 49 歡迎瞭解 Rust 裸機開發 244 50 no_std 245 50.1 最簡單的 no_std 程式 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 50.2 alloc . . . 標準程式庫包含各式實用巨集。 • println!(format, ..) prints a line to standard output, applying formatting described in std::fmt. • format!(format, ..) 的運作方式與 println! 類似,但會以字串形式傳回結果。 • dbg!(expression) 會記錄並傳回運算式的值。 • todo 等於size_of::0 码力 | 356 页 | 1.41 MB | 1 年前3
Comprehensive Rust(한국어) 202412Exercise 250 48 연습문제해답 252 XI Bare Metal 오전 253 49 Welcome to Bare Metal Rust 254 50 no_std 255 50.1 최소한의 no_std 프로그램 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 50.2 alloc . . . . 포함되어 있습니다. • println!(format, ..) prints a line to standard output, applying formatting described in std::fmt. • format!(format, ..) 은 println!처럼 작동하지만결과를 문자열로 반환합니다. • dbg!(expression) 은 표현식의 값을 기록하고 반환합니다 아래의 예제코드를사용하세요. 주의할 점은, 여기에서 보여주는 비트 패턴이 컴파일러가보장해 주는 것은 아니라는 점입니다. 여기에 의 존하는 것은 완전히 unsafe 합니다. use std::mem::transmute; macro_rules! dbg_bits { ($e:expr, $bit_type:ty) => { println!("- {}: {:#x}", stringify0 码力 | 369 页 | 1.29 MB | 11 月前3
共 34 条
- 1
- 2
- 3
- 4













