docs: add and clean up AI-generated rustdoc comments (grok-4.5)

This commit is contained in:
2026-08-05 19:21:00 +08:00
parent bc308d6996
commit a20c61cc88
65 changed files with 1070 additions and 15 deletions

View File

@@ -15,8 +15,13 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
/// macOS-specific utilities for constructing paths to build artifacts.
///
/// This module defines functions to generate paths for binaries, static
/// libraries, shared libraries, ELF files, and EFI executables on macOS.
use super::path_util::{default_bin_rel, default_lib_rel, join_dir};
/// Constructs the path to a binary for the given profile, name, and optional target directory.
pub fn bin_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
match target_dir {
Some(dir) => join_dir(dir, name),
@@ -24,6 +29,7 @@ pub fn bin_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
}
}
/// Constructs the path to a static library archive for the given profile, name, and optional target directory.
pub fn lib_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
let file = format!("lib{name}.a");
match target_dir {
@@ -32,10 +38,12 @@ pub fn lib_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
}
}
/// Constructs the path to an ELF binary for the given profile, name, and optional target directory.
pub fn elf_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
bin_path(profile, name, target_dir)
}
/// Constructs the path to an EFI executable for the given profile, name, and optional target directory.
pub fn efi_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
let file = format!("{name}.efi");
match target_dir {
@@ -44,6 +52,7 @@ pub fn efi_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
}
}
/// Constructs the path to a shared library for the given profile, name, and optional target directory.
pub fn shared_lib_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
let file = format!("lib{name}.dylib");
match target_dir {