aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-php-src/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe-php-src/src/lib.rs')
-rw-r--r--crates/shirabe-php-src/src/lib.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/crates/shirabe-php-src/src/lib.rs b/crates/shirabe-php-src/src/lib.rs
new file mode 100644
index 00000000..1e2c2a0f
--- /dev/null
+++ b/crates/shirabe-php-src/src/lib.rs
@@ -0,0 +1,19 @@
+//! Rust port from the original C implementation in php-src.
+//! See `LICENSE.md` at the repository root.
+//!
+//! Rules for this crate:
+//!
+//! * Any code written while looking at php-src belongs here, and nowhere else. `shirabe-php-shim`
+//! must not contain php-src derived code; it depends on this crate instead.
+//! * The dependency direction is `shirabe-php-shim` -> `shirabe-php-src` only. This crate must not
+//! depend on any other crate in the workspace, so that BSD-derived code cannot pull in
+//! MIT-licensed types.
+//! * The module layout mirrors php-src's own tree (`src/standard/string.rs` holds code derived
+//! from `ext/standard/string.c`), so the origin of a function is visible from its path.
+//! * Every item carries a fixed-format origin comment:
+//!
+//! ```text
+//! /// php-src: ext/standard/strnatcmp.c `strnatcmp_ex` (PHP 8.5.2)
+//! ```
+
+pub mod standard;