Map a normalized path onto its repo-relative `programs/...` key, if it traverses a `programs` directory, so a relative import can hit the embedded source table.
(path: &Path)
| 1372 | } |
| 1373 | } |
| 1374 | let trimmed = out.trim_matches('_'); |
| 1375 | if trimmed.is_empty() { |
| 1376 | "artifact".to_owned() |
| 1377 | } else { |
| 1378 | trimmed.to_owned() |
| 1379 | } |
| 1380 | } |
| 1381 | |
| 1382 | // --- Filesystem layout --- |
| 1383 | |
| 1384 | /// Canonical on-disk filesystem layout constants, mirroring `FS_*` in |
| 1385 | /// `kernel/fs/fs.hll`. Filesystem layout: see _`OS_SPECIFICATION.md`. |
| 1386 | pub mod fs_layout { |
| 1387 | /// Block size in bytes (`FS_BLOCK_SIZE`). |
| 1388 | pub const BLOCK_SIZE: usize = 4096; |
| 1389 | /// Inode size in bytes (`FS_INODE_SIZE`). |
| 1390 | pub const INODE_SIZE: usize = 128; |
| 1391 | /// Total inode count (`FS_MAX_INODES`). |
no test coverage detected