Rust Lang Team
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- title: "Lang/RfL meeting 2025-03-12" tags: ["T-lang", "design-meeting", "minutes"] date: 2025-03-12 discussion: https://rust-lang.zulipchat.com/#narrow/channel/425075-rust-for-linux/topic/2025-03-12.20meeting/with/505196727 url: https://hackmd.io/e_sJtc0UQPWVgVBMDUY33A --- # Lang/RfL meeting 2025-03-12 ## Attendance People: TC, Miguel, Niko, Alice Ryhl, davidtwco, Benno Lossin, Boqun Feng, Gary Guo, Wesley Wiser, Josh ## Tracking [Tracking issue](https://github.com/rust-lang/rust-project-goals/issues/116) ### KCFI: -Csanitize-kcfi-arity support in rustc Miguel: First case (in recent times) where we have somebody from the kernel coming, there is some flag in Clang, we need the equivalent in rustc, the flag is simple, the PR is simple, if we could get it merged, great. Then they can use the nightly toolchain and use that to easily test on their side. - https://github.com/rust-lang/rust/issues/138311 - https://github.com/rust-lang/rust/pull/138368 davidtwco: I can assign myself and we can take a look. ### `-Zbinary-dep-depinfo` Miguel: We may be able to emulate this in the build system (at least for kernelspace crates). Alice: How does `make` know which `.rs` files are part of a module? i.e., if I touch this `rs` file, this module needs to be rebuilt. Miguel: Those are covered without the flag already. davidtwco: https://github.com/rust-lang/rust/issues/63012 is our tracking issue for this. Miguel: I'm planning to investigate this and confirm we can remove it. It doesn't seem like it's something that the compiler team is looking to remove immediately, so as long as it does not go away suddenly, it is fine. davidtwco: It's something that we use as part of bootstrapping, so it's unlikely we'll remove it. davidtwco: Actually, I'm not sure why it couldn't just be the default, but we'd need to look into it more closely. Wesley: I looked at it a few weeks ago. I think it kind of makes sense to stabilize but we might have some other options than what's currently implemented depending on how our `.d` files are being used. ### Arbitrary self types v2 Stabilization was blocked on: - https://github.com/rust-lang/rust/pull/136764 That's now merged. Now it's block on: - https://github.com/rust-lang/rust/pull/136776 And it's also now blocked on a concern about having a plan for how we'd later allow `self: Pin<Ptr>` self types. We're probably going to need another item owner and implementor to drive this forward. Maybe Ding would be a candidate for this. NM: Regarding #136776, I've come to the conclusion we shouldn't do a FCW but instead do the hard error but add targeted help suggestion. Maybe it could even be machine-applicable. We'd tell people to use `transmute`. ### Derive smart pointer This now has no outstanding concerns and will go into FCP with one more checkbox. Unsizing coercion for tuples was removed in: - https://github.com/rust-lang/rust/pull/137728 Given that, nikomatsakis closed the [tracking issue](https://github.com/rust-lang/rust/issues/42877). ### Blog post about how the RfL project goal has gone Niko has a draft started on this. ### Canonical list of compiler flag requests davidtwco: There are compiler flags listed on https://github.com/Rust-for-Linux/linux/issues/355 and https://github.com/Rust-for-Linux/linux/issues/2 - which is the proper list to be looking at? How are these prioritized between these? Which list should we be looking at here? Miguel: #355 is not implemented flags, #2 is implemented flags needing stabilisation. ### asm_goto This is waiting on review of a Reference PR. - <https://github.com/rust-lang/reference/pull/1693> - <https://github.com/rust-lang/rust/pull/133870> ### Support for pointers with asm_const Feature request: https://github.com/rust-lang/rust/issues/128464 Implementation unblocked by https://github.com/rust-lang/rust/pull/137180, and initial step is https://github.com/rust-lang/rust/pull/137686 Within RfL, having this has been identified as something that would be very helpful. Implementation is now in progress: https://github.com/rust-lang/rust/pull/137686 Probably we'll do an RFC here after the experiment. ### Is `naked_asm` used by kernel? Not really. Kernel can use `.s` files -- but "global asm" is used. ### 2025 goals https://rust-lang.github.io/rust-project-goals/2025h1/rfl.html ### ABI-modifying compiler flags The RFC was accepted by T-compiler: https://github.com/rust-lang/rfcs/pull/3716 There's a PR that started work on this: https://github.com/rust-lang/rust/pull/133138 We've created tracking issue: https://github.com/rust-lang/rust/issues/136966 Niko [pinged azhogin on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/425075-rust-for-linux/topic/ABI-modifying.20flags.20.23136966) to see whether they are interested in continuing the work they started in <https://github.com/rust-lang/rust/issues/133138>. There was back and forth on that. We're still not sure whether azhogin is willing to continue on it, so this one is blocked on looking for an implementor. Alice: The current solution assumes that target modifiers with `=` can only take one value, but that doesn't work for e.g. sanitizers, where you can enable more than one. davidtwco: I may be able to find some time to work on this. ### Extract dependency information, configure no-std externally Miguel is planning to look into this flag, and then discuss with everyone here. One of the questions is whether we could skip `core` and do it only for the non-sysroot crates. We last discussed it in: https://hackmd.io/Jq3Xo0ZARAKNsRBC3lXkEA tmandry had said: > tmandry: Do you want toolchain runtimes (libstd, compiler-rt) in your dep info? In my experience this features does 90% of what I want it to do, but removing the inclusion of runtimes is the only question I have before stabilizing. (we don't understand this point) This is part of what Miguel is looking into. Miguel: We can cross this out at the moment (see `-Zbinary-dep-depinfo` discussion above) If compiler wants to remove this flag, please let us know, but we're going to try to remove our use of this. ### Rustdoc features to extract doc tests We understand this to be implemented. Miguel talked with Guillaume at FOSDEM, and he's interested in implementing this in the kernel. He's looking into that. The first iteration of this patch was sent to the kernel: https://lore.kernel.org/rust-for-linux/20250228163844.945140-2-guillaume1.gomez@gmail.com/#r Miguel: The way he did it requires to know the post-processing that `rustdoc` does, and thus requires hard-coding certain knowledge on the user side, e.g. we still need to find particular strings: ```rust let doctest_code = doctest_code.replace( "fn main() { fn _inner() -> Result<", "fn main() { fn _inner() -> core::result::Result<", ); ``` We discussed this here: https://github.com/rust-lang/rust/pull/134531#discussion_r1894610592 I'd like to see how we could make this more flexible for users (Linux kernel and others). What's implemented is better than what we had before, but we can do better than this still, so we shouldn't stabilize what's now here, as it would lock us in. ### Clippy configuration There's a discussion involving flip1995: <https://rust-lang.zulipchat.com/#narrow/channel/257328-clippy/topic/stablization.20of.20clippy.2Etoml.20a/near/486169617> Flip1995 wrote this pre-RFC: https://hackmd.io/@flip1995/By87NXIc1g Miguel: Either a file or flags would be OK for the kernel. In some ways, having flags is easier for the kernel and other things with custom build systems. > What we need is that Clippy does not break in the future when using it. For that, there are a few aspects: > > - The stability of each of the configuration keys and values (currently we use: msrv, check-private-items and disallowed-macros). > - The stability of the .clippy.toml file (i.e. its existence). The kernel does not necessarily need that it is a file -- we could also use flags, for instance. > - The stability of the CLIPPY_CONF_DIR environment variable. The kernel uses it since it supports builds outside the source tree and thus we need to point it to the source tree so that it finds .clippy.toml. If we were not to use the .clippy.toml, file, this would not be needed. > - How to handle different compiler versions: for other tools (e.g. rustc), the kernel already handles passing different sets of flags depending on the compiler version. It would be easy for us to do the same for Clippy if the configuration options could be passed that way. Otherwise, if it is a file, there is the question of how to handle unknown keys/values. The kernel could also consider generating the configuration file on the fly, to avoid that issue. This is waiting on movement on the clippy side. ### Blessed way to rebuild std https://rust-lang.github.io/rust-project-goals/2025h1/build-std.html David's team at ARM has talked through a document about how to go about this. The next step is putting out a kind of vision document about what we should be doing. The immediate goal will be the parts of it that are needed for RfL. Wesley, Josh, and some others on the Cargo team have reviewed the document and are giving feedback. It's in the pre-pre-RFC stage. There's still a lot of iterating on the right design. We somewhat have to flesh out the entire design to know what we can do for the first piece. The piece for RfL will then be the first one to stabilize, as it will be the easiest. Josh has volunteered to be the champion for this on the Cargo side, and iterate on this to get the document to a state that addresses concerns raised by members of the Cargo team. ### What kind of compiler flags will Rust-for-Linux need? https://github.com/Rust-for-Linux/linux/issues/2 Wesley sent a PR to stabilize `-Zdwarf-version`. https://github.com/rust-lang/rust/pull/136926 Wesley has proposed FCP merge here and is enthusiastic about doing it. If there's a bug here, it'd be in LLVM. This is leaned on heavily in other places. It's currently waiting for checkboxes on the FCP. ### `cfg(no_global_oom_handling)` https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/no_global_oom_handling.20removal/near/498600545 RfL doesn't use this any more, but it's still in the code for Linux 6.12 which is an LTS kernel. We could backport the commit that removes the use. Otherwise, this caps the maximum Rust version (which would not be a great look). In discussion, it sounds likely on the kernel side this could be removed from LTS. From [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/no_global_oom_handling.20removal): > Daniel Paoliello: > >> We are still using this in the Windows kernel. Unfortunately, using kernel::alloc is not an option for us since it's GPLed. Miguel: This is now gone from the new kernel and it's been backported to LTS. So Linux does not use it anymore, and we have removed it from our RfL tracking. ### Disabling the orphan rule https://github.com/rust-lang/rust/issues/136979 From the 2025-02-26 meeting we talked about RfL using the nightly feature for `#[fundamental]` as the best workaround for testing here.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully