Rust-for-Linux-vincenzopalazzo

@rust-for-linux-vincenzopalazzo

vincenzopalazzo work regarding Rust for linux

Public team

Joined on Sep 23, 2022

  • Some example https://godbolt.org/z/KKzhe8n38 define dso_local noundef i32 @f() local_unnamed_addr #0 { ret i32 42 } define dso_local void @f(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.S) align 4 %0) local_unnamed_addr #0 {
     Like  Bookmark
  • Topic: Linux Bug fixing mentoring Put comment here!
     Like  Bookmark
  • kproc-macros impl: https://codeberg.org/vincenzopalazzo/kproc-macros example: https://codeberg.org/vincenzopalazzo/deep-procedural-macros/src/branch/main/builder/src/lib.rs syn impl: https://github.com/dtolnay/syn example: https://github.com/dtolnay/syn/blob/master/examples/heapsize/heapsize_derive/src/lib.rs#L47 Vincent Proposal and goal kproc-macros is proposed to have a minimal version of syn inside the kernel and also to have for this experimental phase something ad-hock to perform API change without work on a big codebase like syn.
     Like  Bookmark
  • This is a design document where it is described a proposal to integrate a library in the Linux kernel where it is possible parser easly rust code to make easy the parsing of a procedural macros For now there is a support only for the following procedural macros [ ] Derive macro, usually star with #[derive(InitPin)] [ ] Function-like macro, can unlock feature to simplify the module writing [ ] Attribute macro
     Like  Bookmark
  • Ok, I start to get involved in the Rust-for-Linux project, and one of the problem was that I did not know where to start because I was new to the kernel development, but at the same time I did not want spent to much time on the project without adding value to it. So in order to speed up this process I start to read the LDD3 book and translate some of the book chaptert before in a reproducible C code that run inside the CI, and after that move this code to rust. All the code is available on my codeberg repository This process give me the flexibility to understand the actual difficulties to write a kernel module in Rust and also to speed up my understanding of the kernel crates already developed. So in this blog series is composed from the following blog posts: Hello World module in Rust for the Linux Kernel; Scull Character module in Rust for the Linux Kernel;
     Like  Bookmark
  • Onboarding on Linux Kernel Mentor blog Mentor Series Intro web site: https://kernelnewbies.org
     Like  Bookmark