| /linux/Documentation/translations/zh_CN/rust/ |
| H A D | quick-start.rst | 14 本文介绍了如何开始使用Rust进行内核开发。 16 安装内核开发所需的 Rust 工具链有几种方式。一种简单的方式是使用 Linux 发行版的软件包 18 匹配 Rust 和 Clang 所使用的 LLVM。 21 供的预构建稳定版本的 LLVM+Rust。这些与 :ref:`获取 LLVM <zh_cn_getting_llvm>` 中的精 22 简快速 LLVM 工具链相同,并添加了 Rust for Linux 支持的 Rust 版本。提供了两套工具 25 或者,接下来的两个 "依赖" 章节将解释每个组件以及如何通过 ``rustup``、Rust 的独立 37 Arch Linux 提供较新的 Rust 版本,因此通常开箱即用,例如:: 45 Debian 13(Trixie)以及 Testing 和 Debian Unstable(Sid)提供较新的 Rust 版 54 Fedora Linux 提供较新的 Rust 版本,因此通常开箱即用,例如:: 62 Gentoo Linux 提供较新的 Rust 版本,因此通常开箱即用, [all …]
|
| H A D | general-information.rst | 14 本文档包含了在内核中使用Rust支持时需要了解的有用信息。 19 内核中的 Rust 支持只能链接 `core <https://doc.rust-lang.org/core/>`_, 29 Rust内核代码使用其内置的文档生成器 ``rustdoc`` 进行记录。 61 (一个Rust linter)来实现。要启用它,请将CLIPPY=1传递到用于编译的同一调用中,例如:: 70 抽象是用Rust代码包装来自C端的内核功能。 72 为了使用来自C端的函数和类型,需要创建绑定。绑定是Rust对那些来自C端的函数和类型的声明。 74 例如,人们可以在Rust中写一个 ``Mutex`` 抽象,它从C端包装一个 ``Mutex结构体`` ,并 120 Rust 端使用。 127 包括用 Rust 编写的驱动程序或文件系统等。 130 Rust 惯例的代码。基本示例包括将 C 的资源获取和释放转换为 Rust 的初始化 [all …]
|
| H A D | testing.rst | 13 本文介绍了如何在内核中测试 Rust 代码。 24 这些测试来自 Rust 文档中的示例。它们会被转换为 KUnit 测试。 42 Kernel hacking -> Rust hacking -> Doctests for the `kernel` crate 67 这意味着文档测试会被编译成 Rust 内核对象,从而可以在构建的内核环境中运行。 69 通过与 KUnit 集成,Rust 的文档测试可以复用内核现有的测试设施。 104 其中标明了原始测试的文件和行号(不是 ``rustdoc`` 生成的临时 Rust 文件位置):: 108 Rust 测试中常用的断言宏是来自 Rust 标准库( ``core`` )中的 ``assert!`` 和 ``assert_eq!`` 宏。
|
| H A D | arch-support.rst | 13 目前,Rust编译器(``rustc``)使用LLVM进行代码生成,这限制了可以支持的目标架构。此外,对
|
| /linux/samples/rust/ |
| H A D | Kconfig | 4 bool "Rust samples" 7 You can build sample Rust kernel code here. 17 This option builds the Rust configfs sample. 27 This option builds the Rust minimal module sample. 37 This option builds the Rust misc device. 47 This option builds the Rust printing macros sample. 58 This option builds the Rust DMA Test driver sample. 69 This option builds the Rust DebugFS Test module sample. 80 This option builds the Rust Scoped DebugFS Test module sample. 91 This option builds the Rust I2 [all...] |
| /linux/rust/zerocopy-derive/ |
| H A D | repr.rs | 41 Rust, enumerator 93 Rust => "repr(Rust)", in repr_type_name() 219 Rust => ts.append_all(quote_spanned! { self.span=> #[repr(Rust)] }), in to_tokens() 273 Rust, enumerator 314 Rust => Ok(CompoundRepr::Rust), in try_from() 330 Transparent | C | Rust | Align(_) | PackedN(_) | Packed => { in try_from() 354 | Transparent | C | Rust | Align(_) => Err(UnsupportedReprError), in try_from() 362 | Transparent | C | Rust => Err(FromRawReprError::None), in try_from() 500 compound.unwrap_or(Spanned::new(CompoundRepr::Rust, Span::call_site())), in from_attrs_inner() 596 ("Rust", None) => Rust, in from_meta() [all …]
|
| H A D | README.md | 3 These source files come from the Rust `zerocopy-derive` crate, version v0.8.54
|
| /linux/Documentation/rust/ |
| H A D | coding-guidelines.rst | 6 This document describes how to write Rust code in the kernel. 21 The default settings of ``rustfmt`` are used. This means the idiomatic Rust 27 the entire kernel Rust sources is needed at some point, the following can be 195 Rust kernel code is not documented like C kernel code (i.e. via kernel-doc). 196 Instead, the usual system for documenting Rust code is used: the ``rustdoc`` 204 This is how a well-documented Rust function may look like: 251 - Rust items (functions, types, constants...) must be linked appropriately 262 To learn more about how to write documentation for Rust and extra features, 284 Rust kernel code refers to C types, such as ``int``, using type aliases such as 301 Rust kernel code follows the usual Rust naming conventions: [all …]
|
| /linux/tools/perf/tests/shell/ |
| H A D | data_type_profiling.sh | 87 test_basic_annotate Basic Rust 88 test_basic_annotate Pipe Rust
|
| /linux/Documentation/translations/it_IT/process/ |
| H A D | programming-language.rst | 42 Rust chapter 45 Il kernel supporta sperimentalmente il linguaggio di programmazione Rust 48 ``--edition=2021`` [it-rust-editions]_. Le edizioni Rust sono un modo per 68 .. [it-rust-unstable-features] https://github.com/Rust-for-Linux/linux/issues/2
|
| H A D | changes.rst | 66 Rust (opzionale) 1.85.0 rustc --version 95 Rust (opzionale) 98 È necessaria una versione recente del compilatore Rust. 101 requisiti per compilare code Rust. In particolare, la regola ``rustavailable`` 108 ``bindgen`` viene usato per generare il collegamento (binding) da Rust al lato C del kernel. Dipend… 431 Rust subsection
|
| /linux/rust/ |
| H A D | bindgen_parameters | 25 # If SMP is disabled, `arch_spinlock_t` is defined as a ZST which triggers a Rust 37 # nor Rust currently understand, and which Clang currently declares to be unstable.
|
| /linux/Documentation/ |
| H A D | Changes | 62 Rust (optional) 1.85.0 rustc --version 90 Rust (optional) 93 A recent version of the Rust compiler is required. 96 satisfy the build requirements of Rust support. In particular, the ``Makefile`` 97 target ``rustavailable`` is useful to check why the Rust toolchain may not 103 ``bindgen`` is used to generate the Rust bindings to the C side of the kernel. 402 ``rustdoc`` is used to generate the documentation for Rust code. Please see 421 Rust
|
| H A D | index.rst | 65 Rust <rust/index>
|
| /linux/kernel/configs/ |
| H A D | rust.config | 1 # Help: Enable Rust
|
| /linux/rust/pin-init/ |
| H A D | README.md | 3 [](https://deps.rs/repo/github/Rust-for-Linux/pin-init) 6  25 [Pinning][pinning] is Rust's way of ensuring data does not move. 30 This library's main use-case is in [Rust-for-Linux]. Although this version can be used 36 in direct conflict with Rust's normal process of first initializing an object and then moving 241 [Rust-for-Linux]: https://rust-for-linux.com/
|
| /linux/Documentation/process/ |
| H A D | changes.rst | 62 Rust (optional) 1.85.0 rustc --version 90 Rust (optional) 93 A recent version of the Rust compiler is required. 96 satisfy the build requirements of Rust support. In particular, the ``Makefile`` 97 target ``rustavailable`` is useful to check why the Rust toolchain may not 103 ``bindgen`` is used to generate the Rust bindings to the C side of the kernel. 402 ``rustdoc`` is used to generate the documentation for Rust code. Please see 421 Rust subsection
|
| /linux/tools/build/ |
| H A D | Build.include | 102 # Rust flags to be used on rule definition, includes: 104 # - per target Rust flags 105 # - per object Rust flags
|
| /linux/rust/quote/ |
| H A D | README.md | 3 These source files come from the Rust `quote` crate, version 1.0.40
|
| /linux/rust/syn/ |
| H A D | README.md | 3 These source files come from the Rust `syn` crate, version 2.0.106
|
| /linux/rust/proc-macro2/ |
| H A D | README.md | 3 These source files come from the Rust `proc-macro2` crate, version
|
| /linux/rust/zerocopy/ |
| H A D | README.md | 3 These source files come from the Rust `zerocopy` crate, version v0.8.54
|
| /linux/scripts/atomic/ |
| H A D | gen-rust-atomic-helpers.sh | 43 * This file provides helpers for the various atomic functions for Rust.
|
| /linux/drivers/net/phy/ |
| H A D | Kconfig | 66 bool "Rust PHYLIB abstractions support" 70 Adds support needed for PHY drivers written in Rust. It provides 161 bool "Rust reference driver for Asix PHYs" 164 Uses the Rust reference driver for Asix PHYs (ax88796b_rust.ko).
|
| /linux/rust/zerocopy-derive/derive/ |
| H A D | from_bytes.rs | 121 Repr::Transparent(_) | Repr::Compound(Spanned { t: CompoundRepr::Rust, span: _ }, _) => { in derive_from_zeros_enum()
|