diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-09 20:29:43 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-09 20:57:24 +0800 |
| commit | 39724ff4d6e4e2fdd8b476077523e251ad686780 (patch) | |
| tree | 659f227883e6cccaaa4a6da5cec1d8188127eed3 | |
| parent | bafe23f814bbd257ba347a9f4ce111cccf0080b3 (diff) | |
docs(abouts): reorganize dev-docs into categorized subdirectories
Move about docs and templates from the root docs folder into
dev-docs/abouts and dev-docs/templates respectively, adding .name
files for directory metadata
| -rw-r--r-- | docs/dev-docs/abouts/.name | 1 | ||||
| -rw-r--r-- | docs/dev-docs/abouts/ai-translation-rule.md (renamed from docs/_ABOUT_TRANSLATION.md) | 0 | ||||
| -rw-r--r-- | docs/dev-docs/abouts/code-verify-system.md (renamed from docs/_ABOUT_CODE_VERIFY.md) | 28 | ||||
| -rw-r--r-- | docs/dev-docs/templates/.name | 0 | ||||
| -rw-r--r-- | docs/dev-docs/templates/doc.md (renamed from docs/_DOCS_TEMPLATE.md) | 0 |
5 files changed, 15 insertions, 14 deletions
diff --git a/docs/dev-docs/abouts/.name b/docs/dev-docs/abouts/.name new file mode 100644 index 0000000..d5a4a33 --- /dev/null +++ b/docs/dev-docs/abouts/.name @@ -0,0 +1 @@ +Abouts diff --git a/docs/_ABOUT_TRANSLATION.md b/docs/dev-docs/abouts/ai-translation-rule.md index cc33128..cc33128 100644 --- a/docs/_ABOUT_TRANSLATION.md +++ b/docs/dev-docs/abouts/ai-translation-rule.md diff --git a/docs/_ABOUT_CODE_VERIFY.md b/docs/dev-docs/abouts/code-verify-system.md index 81c86fc..7694544 100644 --- a/docs/_ABOUT_CODE_VERIFY.md +++ b/docs/dev-docs/abouts/code-verify-system.md @@ -11,11 +11,11 @@ You can also test a single file via command-line arg: ```sh ./run-tools.sh test-all-markdown-code docs/pages/1-getting-started.md ``` - + ```powershell .\run-tools.ps1 test-all-markdown-code docs/pages/1-getting-started.md ``` - + ## Default Rules Every verified ` ```rust ` code block gets the following injected automatically at compile time — no need to write them explicitly in the block: @@ -79,7 +79,7 @@ Each block (or each dedup-hash group) gets its own Cargo project: └── src/ └── main.rs ``` - + ### 3. Build Verification Compiled with `cargo build --release`, stderr inherited to the terminal for real-time progress. @@ -115,7 +115,7 @@ Marks the block **not to be compiled**. Use for illustrative snippets that can't // This block is illustrative only, won't be compiled fn placeholder() {} ``` - + ### `// BUILD TIME` Marks the block as a `build.rs` script instead of `src/main.rs`. The block code is wrapped in `fn main() { }` and written to `build.rs`. A stub `fn main() {}` is generated for `src/main.rs`. @@ -125,7 +125,7 @@ Marks the block as a `build.rs` script instead of `src/main.rs`. The block code // Features: ["builds", "pathf"] analyze_and_build_type_mapping().unwrap(); ``` - + ### `// Features: [...]` Declares the mingling crate features needed by this block, as a JSON string array. These features are written into `Cargo.toml`'s `[dependencies]`. @@ -133,7 +133,7 @@ Declares the mingling crate features needed by this block, as a JSON string arra ```rust // Features: ["full", "serde"] ``` - + ### `// Dependencies:` Declares external crate deps needed by the block. After `// Dependencies:`, each dep goes on one line: `// crate_name = "version"`. @@ -143,7 +143,7 @@ Declares external crate deps needed by the block. After `// Dependencies:`, each // serde = "1" // clap = "4" ``` - + > [!TIP] > > **Special handling**: @@ -169,7 +169,7 @@ This is useful when you want to show only the core logic while keeping the block @@@// This line is hidden but still compiled @@@fn setup() { /* hidden boilerplate */ } ``` - + ### How it works | Stage | Handling | @@ -213,23 +213,23 @@ Use `@@@` for: // Example code ... ``` ```` - + The above block compiles equivalently to: ```rust #![allow(dead_code)] #![allow(unused)] - + #[allow(unused_imports)] use mingling::prelude::*; - + // Example code ... - + fn main() {} - + mingling::macros::gen_program!(); ``` - + `Cargo.toml` will contain: ```toml diff --git a/docs/dev-docs/templates/.name b/docs/dev-docs/templates/.name new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/docs/dev-docs/templates/.name diff --git a/docs/_DOCS_TEMPLATE.md b/docs/dev-docs/templates/doc.md index 6a56bbd..6a56bbd 100644 --- a/docs/_DOCS_TEMPLATE.md +++ b/docs/dev-docs/templates/doc.md |
