mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-22 14:59:42 +00:00
docs: add and clean up AI-generated rustdoc comments (grok-4.5)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user