-
-
Notifications
You must be signed in to change notification settings - Fork 430
Add Justfiles to build documentation for all workspace crates/ and utils/ #3635
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
base: main
Are you sure you want to change the base?
Add Justfiles to build documentation for all workspace crates/ and utils/ #3635
Conversation
The Justfile in the root directory calls the Justfile in each of the crates' directory to compile the docs. Also, there was an issue with the libafl_targets docs not rendering correctly. It was fixed by adding an extra newline between README.md and document-features.
Some intradoc links had to be fixed in libafl_nyx. Building the docs for this also requires cpio. There are some issues with the docs of libafl_nyx i.e. the README.md file does not get added to the docs. After this commit, I am going to build every single doc again and then go through everything built to check that all links work, there are no typos and that all relevant info gets added to the docs.
Also fixed docs issue with libafl_nyx and included README.md in the docs
namely - libafl_sugar, libafl_tinyinst, libafl_unicorn, ll_mp, minibsod, no_std_time, ownedref, serde_anymap, shmem_providers, tuple_list_ex
This required a bypass where I had to pass in "--cfg clippy" to RUSTFLAGS as well as RUSTDOCFLAGS.
The libafl_asan justfile was restructured such that the -fuzz and -libc crates are now imported as modules. This means that they will have separate namespaces, thus making it easier to avoid conflicts where "doc" is defined in all three.
|
If this approach is alright then I'll add it to the GitHub workflow file as well. I have some concerns about the repetition in files though - a lot of the files are the same command. Also not sure of a better approach for the libafl_libfuzzer where |
This removes the dependency of cpio when building libafl_nyx and it makes the build time faster too!
|
Trying to build the libafl_qemu docs in Github workflows gives this error: The build scripts make it so that if DOCS_RS=1 is set, then it skips the build phase - so it will not need llvm. But, the doc build for libafl_qemu fails after that because it has unresolved imports and types (logs attached below). @domenukk do you have any idea on what the issue is here? The libafl_asan test is unrelated to my changes and is failing on a separate PR as well. The rest of the build works fine - locally, there are no errors (since llvm stuff is installed) and all docs for workspace crates as well as utils get built correctly. The failing logs: |
|
ubuntu-doc-build now successfully runs! I changed it to build usermode instead of systemmode docs. I'll go through the changes one more time to see if I had anything to do with the currently failing CI/CD tasks and if there's anything I can fix in the docs itself (not correctly formatted, typos etc.) before making this ready for review. Edit: to my knowledge, the failed CI/CD checks are unrelated to my changes. |
As mentioned in #3530, this PR is working towards creating a system to easily build documentation for all crates in the Cargo workspace.
The current structure is that there is a Justfile in the root of the repository, which calls the Justfiles of each of the crates we've created/worked on. So, running
just doc-allwill build the docs for all the crates mentioned in the root Justfile.I am aware that the pull request #3626 exists but it seems to be doing it for the fuzzers - I'll be sticking to 'crates/'. The root Justfile in that PR is vastly different to mine though, so please let me know about any suggestions on how I could make my PR compatible with the repository standards. I'll keep this PR as a draft for now and slowly work towards adding a Justfile to all the crates.
Edit: are the specified features for libafl_qemu's Justfile correct?
Progress (crates done):
cpiodependency, noted it down in its JustfileProgress (utils done):