[lkml]   [2022]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH 0/3] rust: arch/um: Rust support for UML
This series adds support for building and running code in the Rust
programming language under x86_64 UML kernels.

It is based on two Pull Requests from the Rust-for-Linux GitHub page:

The series consists of three patches: the first two set up various
compiler options to match both the UML and the X86 CFLAGS.

Rust support can be enabled by setting CONFIG_RUST=y, when the suitable
Rust compiler and bindgen versions are available (run make rustavaiable
to check). LLVM=1 is also required at present with all Rust builds.

The whole thing can be built and tested with
./tools/testing/kunit/ run --kconfig_add CONFIG_RUST=y --make_options LLVM=1

(Note that there are no Rust-based KUnit tests upstream yet. The "rust"
branch of the Rust-for-Linux GitHub repository does use KUnit for its
"doctests", and all of those tests pass under UML with these patches.)

This series is currently based on the uml/next branch: I'm happy to
rebase it next year once we're past the 6.2 merge window (though it
applies cleanly to torvalds/master at the moment). Equally, it
should be possible to take these changes in via the rust tree instead,
but since it's mostly UML Makefile changes, it probably makes more sense
for it to go in via the uml tree.

Also note that this series marks UML as a "maintained" architecture for
Rust support. It's definitely my intention to keep this working, but if
anyone has serious concerns, we can downgrade that.

-- David

David Gow (3):
rust: arch/um: Use 'pie' relocation mode under UML
rust: arch/um: Disable FP/SIMD instruction to match x86
rust: arch/um: Add support for CONFIG_RUST under x86_64 UML

Documentation/rust/arch-support.rst | 2 ++
arch/um/Kconfig | 1 +
arch/um/Makefile | 2 ++
arch/x86/ | 6 ++++++
4 files changed, 11 insertions(+)


 \ /
  Last update: 2022-12-17 05:45    [W:1.978 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site