Skip to main content

zsh/ported/
mod.rs

1//! Ported subsystems — every submodule here is a faithful 1:1 port of
2//! a corresponding upstream zsh C source file under `src/zsh/Src/`.
3//!
4//! Companion / opposite of `src/extensions/`. See `docs/PORT.md` for the
5//! full ruleset. `tests/port_purity.rs` enforces:
6//!   - Every `.rs` file under this directory has a matching `.c` file
7//!     under `src/zsh/Src/` (byte-for-byte identical stem).
8//!   - Every top-level `fn` carries a doc comment matching the PORT.md
9//!     template: `/// Port of NAME() from Src/STEM.c:NNNN`.
10//!   - No file may carry the `WARNING: THIS IS ADHOC IMPLEMENTATION`
11//!     marker.
12//!
13//! The crate root re-exports every submodule (`pub use ported::*;` in
14//! `src/lib.rs`) so historical call sites that reference
15//! `crate::exec::`, `crate::subst::`, `crate::zle::`, etc. continue
16//! to resolve unchanged.
17
18pub mod compat;
19/// `cond` submodule.
20pub mod cond;
21/// `context` submodule.
22pub mod context;
23// Most of `Src/exec.c` is realised by the fusevm wordcode VM at the
24// crate root (`src/vm_helper`) rather than in `src/ported/`. The
25// genuinely faithful free-function ports from `Src/exec.c` — `gethere`,
26// `getoutput`, `loadautofn`, `getfpfunc`, plus the file-static globals
27// `trap_state` / `trap_return` / `forklevel` — live in `src/ported/exec.rs`.
28// `crate::ported::vm_helper` stays as an alias for the runtime state
29// struct + impl methods that hang off it.
30pub use crate::vm_helper;
31/// `builtin` submodule.
32pub mod builtin;
33/// `builtins` submodule.
34pub mod builtins;
35/// `config_h` submodule.
36pub mod config_h;
37/// `exec` submodule.
38pub mod exec;
39/// `exec_hooks` submodule.
40pub mod exec_hooks;
41/// `glob` submodule.
42pub mod glob;
43/// `hashnameddir` submodule.
44pub mod hashnameddir;
45/// `hashtable` submodule.
46pub mod hashtable;
47/// `hashtable_h` submodule.
48pub mod hashtable_h;
49/// `hist` submodule.
50pub mod hist;
51/// `init` submodule.
52pub mod init;
53/// `input` submodule.
54pub mod input;
55/// `jobs` submodule.
56pub mod jobs;
57/// `lex` submodule.
58pub mod lex;
59/// `linklist` submodule.
60pub mod linklist;
61/// `r` submodule.
62pub mod r#loop;
63/// `math` submodule.
64pub mod math;
65/// `mem` submodule.
66pub mod mem;
67/// `modentry` submodule.
68pub mod modentry;
69/// `module` submodule.
70pub mod module;
71/// `modules` submodule.
72pub mod modules;
73/// `openssh_bsd_setres_id` submodule.
74pub mod openssh_bsd_setres_id;
75/// `options` submodule.
76pub mod options;
77/// `params` submodule.
78pub mod params;
79/// `parse` submodule.
80pub mod parse;
81/// `patchlevel` submodule.
82pub mod patchlevel;
83/// `pattern` submodule.
84pub mod pattern;
85/// `prompt` submodule.
86pub mod prompt;
87mod prototypes_h;
88/// `signals` submodule.
89pub mod signals;
90/// `signals_h` submodule.
91pub mod signals_h;
92/// `sort` submodule.
93pub mod sort;
94/// `string` submodule.
95pub mod string;
96/// `subst` submodule.
97pub mod subst;
98/// `text` submodule.
99pub mod text;
100/// `utils` submodule.
101pub mod utils;
102/// `zle` submodule.
103pub mod zle;
104/// `zsh_h` submodule.
105pub mod zsh_h;
106/// `zsh_system_h` submodule.
107pub mod zsh_system_h;
108/// `ztype_h` submodule.
109pub mod ztype_h;
110
111#[cfg(test)]
112mod tests {
113    use super::*;
114}