mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 20:59:37 +00:00
docs: add and clean up AI-generated rustdoc comments (grok-4.5)
This commit is contained in:
@@ -18,10 +18,13 @@
|
||||
use super::path_util::{default_bin_rel, default_lib_rel, join_dir};
|
||||
use crate::utils::build::default_target_triple;
|
||||
|
||||
/// Returns the default target triple string for the host platform.
|
||||
fn host_triple() -> String {
|
||||
default_target_triple()
|
||||
}
|
||||
|
||||
/// Constructs the path to a binary executable.
|
||||
/// If `target_dir` is provided, joins it with the name; otherwise uses default_bin_rel with the host triple.
|
||||
pub fn bin_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
||||
match target_dir {
|
||||
Some(dir) => join_dir(dir, name),
|
||||
@@ -29,6 +32,7 @@ pub fn bin_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
||||
}
|
||||
}
|
||||
|
||||
/// Constructs the path to a static library archive.
|
||||
pub fn lib_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
||||
let file = format!("lib{name}.a");
|
||||
match target_dir {
|
||||
@@ -37,10 +41,12 @@ pub fn lib_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
||||
}
|
||||
}
|
||||
|
||||
/// Constructs the path to an ELF binary.
|
||||
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 binary.
|
||||
pub fn efi_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
||||
let file = format!("{name}.efi");
|
||||
match target_dir {
|
||||
@@ -49,6 +55,7 @@ pub fn efi_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
||||
}
|
||||
}
|
||||
|
||||
/// Constructs the path to a shared library.
|
||||
pub fn shared_lib_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
||||
let file = format!("lib{name}.so");
|
||||
match target_dir {
|
||||
|
||||
Reference in New Issue
Block a user