Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move proc-macro documentation into the kernel crate #1076

Open
y86-dev opened this issue Apr 26, 2024 · 2 comments
Open

Move proc-macro documentation into the kernel crate #1076

y86-dev opened this issue Apr 26, 2024 · 2 comments
Labels
good first issue Good for newcomers • lib Related to the `rust/` library.

Comments

@y86-dev
Copy link
Collaborator

y86-dev commented Apr 26, 2024

Currently all examples in the macros crate are ignored, since they are depending on stuff from the kernel crate. There are several reasons for why we would like them to not be ignored:

  • It shows up in the documentation as "This example is not tested" and might confuse readers.
  • We should execute those examples as tests.
  • It helps keep them up-to date, since are need to compile.

A solution is to move the documentation from the macros crate into the kernel crate via using re-exports. When doing this, please also ensure that the tests compile.


This requires submitting a proper patch to the LKML and the Rust for Linux mailing list. Please recall to test your changes, to use a proper title for the commit, to sign your commit under the Developer's Certificate of Origin and so on. Please see https://docs.kernel.org/process/submitting-patches.html and https://rust-for-linux.com/contributing for details.

Please take this issue only if you are new to the kernel development process and you would like to use it as a test to submit your first patch to the kernel. Please do not take it if you do not plan to make other contributions to the kernel.

@y86-dev y86-dev added • lib Related to the `rust/` library. good first issue Good for newcomers labels Apr 26, 2024
@bjorn3
Copy link
Member

bjorn3 commented Apr 26, 2024

It should be possible to build the macro crate as rmeta, then build the kernel crate as rmeta and finally rustdoc the macro crate with the kernel crate as dependency, right? It just needs both version of the macro crate to be compiled with different -Cmetadata arguments.

@y86-dev
Copy link
Collaborator Author

y86-dev commented Apr 26, 2024

It should be possible to build the macro crate as rmeta, then build the kernel crate as rmeta and finally rustdoc the macro crate with the kernel crate as dependency, right? It just needs both version of the macro crate to be compiled with different -Cmetadata arguments.

Hmm I have no idea if that works, but if anyone wants to try it, feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers • lib Related to the `rust/` library.
Development

No branches or pull requests

2 participants