Skip to main content

xet_runtime/utils/
mod.rs

1pub mod adjustable_semaphore;
2
3pub mod byte_size;
4pub use byte_size::ByteSize;
5
6pub mod config_enum;
7pub use config_enum::ConfigEnum;
8
9pub mod configuration_utils;
10pub use configuration_utils::is_high_performance;
11
12#[cfg(not(target_family = "wasm"))]
13mod file_paths;
14
15#[cfg(not(target_family = "wasm"))]
16pub use file_paths::TemplatedPathBuf;
17
18/// On wasm, path templates and expansion are not supported. Use plain PathBuf.
19#[cfg(target_family = "wasm")]
20pub struct TemplatedPathBuf(std::path::PathBuf);
21
22#[cfg(target_family = "wasm")]
23impl TemplatedPathBuf {
24    pub fn evaluate(path: impl AsRef<std::path::Path>) -> std::path::PathBuf {
25        path.as_ref().to_path_buf()
26    }
27}
28
29// Modules moved from core_structures
30pub mod async_iterator;
31pub mod async_read;
32pub mod errors;
33
34#[cfg(not(target_family = "wasm"))]
35pub mod limited_joinset;
36
37mod output_bytes;
38pub use output_bytes::output_bytes;
39
40#[cfg(not(target_family = "wasm"))]
41pub mod singleflight;
42
43pub mod rw_task_lock;
44pub use rw_task_lock::{RwTaskLock, RwTaskLockError, RwTaskLockReadGuard};
45
46#[cfg(not(target_family = "wasm"))]
47mod guards;
48
49#[cfg(not(target_family = "wasm"))]
50pub use guards::{ClosureGuard, CwdGuard, EnvVarGuard};
51
52#[cfg(not(target_family = "wasm"))]
53pub mod pipe;
54
55mod unique_id;
56pub use unique_id::UniqueId;