) {
}
```
-5. **\[core\]** Added `Program::get_args(&self)` method to expose the program's command-line arguments as a `&[String]` slice, providing public read access to the internal `args` field.
+5. **[`core`]** Added `Program::get_args(&self)` method to expose the program's command-line arguments as a `&[String]` slice, providing public read access to the internal `args` field.
-6. **\[core:comp\]** Added `COMPLETION_SUBCOMMAND` constant to `mingling_core::comp` with the value `"__comp"`, providing a single canonical reference for the completion subcommand name used internally. This replaces hardcoded string literals across the codebase.
+6. **[`core:comp`]** Added `COMPLETION_SUBCOMMAND` constant to `mingling_core::comp` with the value `"__comp"`, providing a single canonical reference for the completion subcommand name used internally. This replaces hardcoded string literals across the codebase.
-7. **\[core:comp\]** Added `Program::is_completing()` method to check whether the program is currently running in completion mode. This provides a convenient way to conditionally skip certain logic during completion generation, where those operations may be unnecessary or undesirable.
+7. **[`core:comp`]** Added `Program::is_completing()` method to check whether the program is currently running in completion mode. This provides a convenient way to conditionally skip certain logic during completion generation, where those operations may be unnecessary or undesirable.
-8. **\[macros\]** Added the `pack_err!` macro for creating error structs with automatic `name` field.
+8. **[`macros`]** Added the `pack_err!` macro for creating error structs with automatic `name` field.
The `pack_err!` macro provides a concise way to define error types that implement `Groupped` and are automatically registered for inclusion in the program enum. The `name` field is automatically set to the snake_case version of the struct name at compile time.
@@ -204,9 +204,9 @@ impl ErrorNotDir {
This macro is only available with the `extra_macros` feature.
-9. **\[mingling\]** Added `Groupped` trait to the `mingling::prelude` module, so it can now be imported via `use mingling::prelude::*` without needing to separately import the trait from the `mingling` crate root.
+9. **[`mingling`]** Added `Groupped` trait to the `mingling::prelude` module, so it can now be imported via `use mingling::prelude::*` without needing to separately import the trait from the `mingling` crate root.
-10. **\[macros:group\]** Added the `group!` macro for registering outside-types from external crates as group members without modifying their definitions. This macro generates a `Groupped` implementation and registers the type's simple name as an enum variant.
+10. **[`macros:group`]** Added the `group!` macro for registering outside-types from external crates as group members without modifying their definitions. This macro generates a `Groupped` implementation and registers the type's simple name as an enum variant.
Uses the type's last path segment as the enum variant name:
@@ -223,7 +223,7 @@ group!(IoError = std::io::Error);
This macro is only available with the `extra_macros` feature.
-11. **\[macros\]** `#[help]` and `#[completion]` now support resource injection parameters, consistent with `#[chain]` and `#[renderer]`. Specific changes:
+11. **[`macros`]** `#[help]` and `#[completion]` now support resource injection parameters, consistent with `#[chain]` and `#[renderer]`. Specific changes:
- `#[help]`: Removed the restriction of "must have exactly one parameter". The first parameter still serves as the entry type, while subsequent parameters are treated as resource injections. The internal implementation was changed from a nested `help_wrapper` function to an inline body (consistent with the renderer), making resource variables visible within the scope.
- `#[completion]`: Removed the restriction of "must have exactly one parameter". The first parameter `ctx: &ShellContext` is used for the `Completion::comp` trait method signature, while subsequent parameters are treated as resource injections. Within the `comp` method body, resource bindings are injected via `::mingling::this::().res_or_default::()` and `modify_res`.
@@ -243,7 +243,7 @@ fn comp_my_entry(ctx: &ShellContext, res: &mut ResA) -> Suggest {
For mutable resources (`&mut T`), both macros use `Program::modify_res` (with constraint `Return: Default`) instead of `#[chain]`'s dedicated `__modify_res_and_return_route` (with constraint `Return: Into`), because the return types of help/completion are `()` and `Suggest` respectively.
-12. **\[macros\]** Added async mutable resource injection support for `#[chain]`. Previously, async chain functions could only use `&T` (immutable) resource injection; `&mut T` was rejected with a compile-time error. Now, async chain functions support `&mut T` resource injection by using an extract‑store pattern: each mutable resource is cloned out of the global store before the body executes (via `__extract_res_mut`), bound as `&mut` within a scoped block, and written back after the block completes (via `__store_res`). This avoids holding a mutable borrow across `.await` points while still providing a natural `&mut T` syntax.
+12. **[`macros`]** Added async mutable resource injection support for `#[chain]`. Previously, async chain functions could only use `&T` (immutable) resource injection; `&mut T` was rejected with a compile-time error. Now, async chain functions support `&mut T` resource injection by using an extract‑store pattern: each mutable resource is cloned out of the global store before the body executes (via `__extract_res_mut`), bound as `&mut` within a scoped block, and written back after the block completes (via `__store_res`). This avoids holding a mutable borrow across `.await` points while still providing a natural `&mut T` syntax.
```rust
use mingling::macros::{chain, pack, gen_program};
@@ -285,7 +285,7 @@ The following explicit syntaxes are **removed**:
---
-1. **\[core\]** **\[structural_renderer\]** Renamed the `general_renderer` feature to `structural_renderer`. All associated types, structs, and APIs have been renamed accordingly:
+1. **[`core`]** **[`structural_renderer`]** Renamed the `general_renderer` feature to `structural_renderer`. All associated types, structs, and APIs have been renamed accordingly:
- Feature flag: `general_renderer` → `structural_renderer`
- Setup struct: `GeneralRendererSetup` → `StructuralRendererSetup`
@@ -304,9 +304,9 @@ The following explicit syntaxes are **removed**:
- Example project: `example-general-renderer` renamed to `example-structural-renderer`
- Test crate: `test-general-renderer` renamed to `test-structural-renderer`
-2. **\[core\]** Changed the signature of `ProgramSetup::setup` from `fn setup(&mut self, program: &mut Program) -> S` to `fn setup(self, program: &mut Program)`, consuming `self` instead of taking a mutable reference. Correspondingly, `Program::with_setup` now accepts `S` by value (`&mut self, setup: S`) instead of by mutable reference (`&mut self, setup: &mut S`).
+2. **[`core`]** Changed the signature of `ProgramSetup::setup` from `fn setup(&mut self, program: &mut Program) -> S` to `fn setup(self, program: &mut Program)`, consuming `self` instead of taking a mutable reference. Correspondingly, `Program::with_setup` now accepts `S` by value (`&mut self, setup: S`) instead of by mutable reference (`&mut self, setup: &mut S`).
-3. **\[core\]** Consolidated resource naming for `ExitCode` and `REPL`:
+3. **[`core`]** Consolidated resource naming for `ExitCode` and `REPL`:
- Renamed `ExitCode` to `ResExitCode` and moved `ResREPL` from the `mingling` root to `mingling::res::ResREPL` (the `mingling::ResREPL` re-export is removed).
- This aligns with the naming convention where resources are prefixed with `Res`.
- The corresponding setup `ExitCodeSetup` and resource injection remain unchanged.
@@ -319,7 +319,7 @@ use mingling::{res::ExitCode, REPL};
use mingling::{res::ResExitCode, res::ResREPL};
```
-4. **\[core\]** **\[macros\]** Migrated `to_chain()` and `to_render()` methods from being generated individually per type by `#[derive(Groupped)]` and `pack!` macros, to being provided as default trait methods on the `Groupped` trait itself.
+4. **[`core`]** **[`macros`]** Migrated `to_chain()` and `to_render()` methods from being generated individually per type by `#[derive(Groupped)]` and `pack!` macros, to being provided as default trait methods on the `Groupped` trait itself.
Previously, each packed or derived type had its own inherent `to_chain()` and `to_render()` methods generated by the macros. Now, these methods are defined on the `Groupped` trait with default implementations, making them available to all types that implement the trait without redundant code generation.
@@ -341,7 +341,7 @@ use mingling::{res::ResExitCode, res::ResREPL};
Removed the per-type inherent method generation from both `groupped.rs` and `pack.rs` in `mingling_macros`.
-5. **\[macros\]** Changed the `route!()` macro's error branch from `return e` to `return ::mingling::Groupped::to_chain(e)`, so that the error type no longer needs to be pre-converted to `ChainProcess` via `.to_chain()` or `.to_render()`. The macro now accepts any type implementing `Groupped` in the error position and automatically converts it.
+5. **[`macros`]** Changed the `route!()` macro's error branch from `return e` to `return ::mingling::Groupped::to_chain(e)`, so that the error type no longer needs to be pre-converted to `ChainProcess` via `.to_chain()` or `.to_render()`. The macro now accepts any type implementing `Groupped` in the error position and automatically converts it.
```rust
// Before
@@ -351,7 +351,7 @@ let value = route!(prev.pick_or_route((), Error::default().to_chain()).unpack())
let value = route!(prev.pick_or_route((), Error::default()).unpack());
```
-6. **\[core\]** **\[hook\]** Refactored the hook system to use structured info types and return `ProgramControls` instead of raw values.
+6. **[`core`]** **[`hook`]** Refactored the hook system to use structured info types and return `ProgramControls` instead of raw values.
The hook system has been redesigned for better type safety, extensibility, and control flow management:
@@ -391,17 +391,17 @@ let value = route!(prev.pick_or_route((), Error::default()).unpack());
- **Examples and internal callers updated** throughout the codebase to use the new hook API patterns.
-7. **\[core\]** **\[structural_renderer\]** Added the `pack_err_structural!`, `pack_structural!`, and `group_structural!` macros for creating types that support structured output (JSON/YAML/TOML/RON). These are like `pack_err!`, `pack!`, and `group!` respectively, but also mark the type with the `StructuralData` trait, enabling the `StructuralRenderer` to serialize them.
+7. **[`core`]** **[`structural_renderer`]** Added the `pack_err_structural!`, `pack_structural!`, and `group_structural!` macros for creating types that support structured output (JSON/YAML/TOML/RON). These are like `pack_err!`, `pack!`, and `group!` respectively, but also mark the type with the `StructuralData` trait, enabling the `StructuralRenderer` to serialize them.
-8. **\[core\]** **\[structural_renderer\]** Added the `StructuralData` derive macro and sealed trait, decoupling structured output from `Groupped`. Previously, under the `structural_renderer` feature, all `pack!` and `pack_err!` types automatically derived `Serialize`. Now, structured output is an opt-in property controlled by `StructuralData`:
+8. **[`core`]** **[`structural_renderer`]** Added the `StructuralData` derive macro and sealed trait, decoupling structured output from `Groupped`. Previously, under the `structural_renderer` feature, all `pack!` and `pack_err!` types automatically derived `Serialize`. Now, structured output is an opt-in property controlled by `StructuralData`:
- `pack!` / `pack_err!` / `group!` no longer derive `Serialize` even when `structural_renderer` is enabled.
- To enable structured output, use `pack_structural!` / `pack_err_structural!` / `group_structural!` or the `#[derive(StructuralData)]` marker.
- The `Groupped` trait no longer requires `Serialize` bounds, and `AnyOutput::new` no longer requires `Serialize`.
- `StructuralRenderer::render` now accepts `T: StructuralData + Send` instead of `T: Serialize + Send`, and the individual format methods (`render_to_json`, etc.) are now private.
-9. **\[core\]** **\[structural_renderer\]** Added `mingling::__private::StructuralDataSealed` and `mingling::__private::StructuralData` (re-exported from `mingling_core::renderer::structural::structural_data`) to support the sealed trait pattern. The `StructuralData` trait is only implementable via the derive macro or the `_structural` macro variants.
+9. **[`core`]** **[`structural_renderer`]** Added `mingling::__private::StructuralDataSealed` and `mingling::__private::StructuralData` (re-exported from `mingling_core::renderer::structural::structural_data`) to support the sealed trait pattern. The `StructuralData` trait is only implementable via the derive macro or the `_structural` macro variants.
-10. **\[macros\]** Changed `ResultEmpty` from a tuple struct (wrapping `()`) to a fieldless unit struct. `ResultEmpty::new(())` is now simply `ResultEmpty`. This simplifies construction and reduces generated code.
+10. **[`macros`]** Changed `ResultEmpty` from a tuple struct (wrapping `()`) to a fieldless unit struct. `ResultEmpty::new(())` is now simply `ResultEmpty`. This simplifies construction and reduces generated code.
- `pack!(ResultEmpty = ())` → `#[derive(...)] pub struct ResultEmpty;`
- `crate::ResultEmpty::new(())` → `crate::ResultEmpty`
@@ -413,17 +413,17 @@ When the `structural_renderer` feature is enabled, `ResultEmpty` also derives `S
#### Fixes:
-1. **\[macros:dispatcher_clap\]** Fixed the issue where clap error messages (`DisplayHelp` and parse errors from `try_parse_from`) could not output ANSI
+1. **[`macros:dispatcher_clap`]** Fixed the issue where clap error messages (`DisplayHelp` and parse errors from `try_parse_from`) could not output ANSI
- For error paths, use `e.render().ansi()` instead of `e.to_string()` to prevent ANSI codes from being stripped by `strip_str` in `StyledStr::Display`
- For help info paths, use with `BasicProgramSetup`, output ANSI-colored help content through the mingling framework's `render_help` flow
#### Optimizations:
-1. **\[macros\]** Removed dependency `once_cell`, replaced with `std::sync::OnceLock`
+1. **[`macros`]** Removed dependency `once_cell`, replaced with `std::sync::OnceLock`
#### Features:
-1. **\[macros\]** Added the `empty_result!()` macro for early return from a chain function. This macro is a shorthand for constructing an `EmptyResult` and converting it into a `ChainProcess`, signaling to the pipeline that there is no meaningful output to continue processing.
+1. **[`macros`]** Added the `empty_result!()` macro for early return from a chain function. This macro is a shorthand for constructing an `EmptyResult` and converting it into a `ChainProcess`, signaling to the pipeline that there is no meaningful output to continue processing.
```rust
use mingling::macros::empty_result;
@@ -440,7 +440,7 @@ fn maybe_skip(prev: SomeEntry) -> Next {
Expands to: `crate::EmptyResult::new(()).to_chain()`
-2. **\[picker\]** Added support for `PathBuf` and `Vec`, and added `PathChecker` for filtering and validating file paths
+2. **[`picker`]** Added support for `PathBuf` and `Vec`, and added `PathChecker` for filtering and validating file paths
```rust
#[chain]
@@ -454,11 +454,11 @@ fn handle_path_pick(prev: PathPick) {
}
```
-3. **\[macros\]** Extended the `#[renderer]` attribute to support custom return types. Previously, `#[renderer]` functions could only return `()`, and the generated helper function always returned `RenderResult`. Now:
+3. **[`macros`]** Extended the `#[renderer]` attribute to support custom return types. Previously, `#[renderer]` functions could only return `()`, and the generated helper function always returned `RenderResult`. Now:
- **`fn foo(x: T)` / `fn foo(x: T) -> ()`** → The generated helper function returns `()`. If the internal `RenderResult` (`dummy_r`) is non-empty, it is automatically printed to stdout.
- **`fn foo(x: T) -> U`** → The generated helper function returns `U`. The internal `RenderResult` is converted via `dummy_r.into()`, and no automatic printing occurs.
-4. **\[macros\]** Resource injection is now shared between `#[chain]` and `#[renderer]`.
+4. **[`macros`]** Resource injection is now shared between `#[chain]` and `#[renderer]`.
Extracted the common resource injection infrastructure (`ResourceInjection`, `extract_args_info`, `generate_immut_resource_bindings`, `wrap_body_with_mut_resources`) from `chain.rs` into a new `res_injection.rs` module. Both `#[chain]` and `#[renderer]` now reuse the same logic.
The `#[renderer]` attribute now supports resource injection parameters (just like `#[chain]`):
@@ -470,11 +470,11 @@ fn render_greeting(prev: Greeting, res: &MyRes) {
}
```
-5. **\[picker\]** Implement `Pickable` for `Option`
+5. **[`picker`]** Implement `Pickable` for `Option`
Added `impl + Default> Pickable for Option`, allowing optional values to be directly parsed via `Pickable` without manually handling the `Option` wrapping logic.
-6. **\[macros\]** Added `entry!` macro
+6. **[`macros`]** Added `entry!` macro
The `entry!` macro provides a convenient way to construct packed entry wrapper types (created via `dispatcher!`) with test data. Two syntax forms are available:
@@ -486,7 +486,7 @@ entry!(MyEntry, ["a", "b", "c"])
entry!["a", "b", "c"]
```
-7. **\[macros\]** Added `dispatcher!` macro with implicit entry/dispatcher name derivation
+7. **[`macros`]** Added `dispatcher!` macro with implicit entry/dispatcher name derivation
```rust
// implicit
@@ -496,7 +496,7 @@ dispatcher!("remote.add" /*, CMDRemoteAdd => EntryRemoteAdd */);
dispatcher!("remote.remove", CMDRemoteRemove => EntryRemoteRemove);
```
-8. **\[macros\]** The `pack!` macro now supports adding doc comments and attributes (e.g., `#[doc(hidden)]`) to the inner structs:
+8. **[`macros`]** The `pack!` macro now supports adding doc comments and attributes (e.g., `#[doc(hidden)]`) to the inner structs:
```rust
pack!{
@@ -510,7 +510,7 @@ pack! {
}
```
-9. **[macros]** The `dispatcher!` macro now supports adding doc comments and attributes (e.g., `#[doc(hidden)]`) to both the dispatcher and entry structs, similar to the `pack!` macro:
+9. **[`macros`]** The `dispatcher!` macro now supports adding doc comments and attributes (e.g., `#[doc(hidden)]`) to both the dispatcher and entry structs, similar to the `pack!` macro:
```rust
// Implicit
@@ -530,7 +530,7 @@ dispatcher! {
}
```
-10. **\[mingling\]** Added the `DirectoryEnvironmentSetup` setup struct, which registers four common directory-based resources (`ResCurrentDir`, `ResCurrentExe`, `ResHomeDir`, `ResTempDir`) in a single call. These resources provide convenient access to the current working directory, the executable's path, the user's home directory, and the system temporary directory, respectively.
+10. **[`mingling`]** Added the `DirectoryEnvironmentSetup` setup struct, which registers four common directory-based resources (`ResCurrentDir`, `ResCurrentExe`, `ResHomeDir`, `ResTempDir`) in a single call. These resources provide convenient access to the current working directory, the executable's path, the user's home directory, and the system temporary directory, respectively.
```rust
use mingling::setups::DirectoryEnvironmentSetup;
@@ -538,7 +538,7 @@ use mingling::setups::DirectoryEnvironmentSetup;
program.with_setup(DirectoryEnvironmentSetup::::default());
```
-11. **\[mingling\]** Added four new resource types for directory environments:
+11. **[`mingling`]** Added four new resource types for directory environments:
- `ResCurrentDir` — Wraps `std::env::current_dir()` as a global resource. Provides `new() -> Result`, `Default` (panics on failure), and conversions from/to `PathBuf`, `&Path`, and `&PathBuf`.
- `ResCurrentExe` — Wraps `std::env::current_exe()` as a global resource. Provides `new() -> Result`, `Default` (panics on failure), and conversions from/to `PathBuf`, `&Path`, and `&PathBuf`.
@@ -549,10 +549,10 @@ program.with_setup(DirectoryEnvironmentSetup::::default());
#### **BREAKING CHANGES** (API CHANGES):
-1. **\[core\]** Panic Unwind will not be supported when the `async` feature is enabled
-2. **\[core\]** `modify_res` signature changed: now returns `Return` instead of `()`
-3. **\[core\]** Renamed internal method `__modify_res_and_return_any` to `__modify_res_and_return_route`
-4. **\[macros\]** Renamed the macro-internal function parameter `r` (used with the `r_` prefix) to `__renderer_inner_result` to reduce context pollution
+1. **[`core`]** Panic Unwind will not be supported when the `async` feature is enabled
+2. **[`core`]** `modify_res` signature changed: now returns `Return` instead of `()`
+3. **[`core`]** Renamed internal method `__modify_res_and_return_any` to `__modify_res_and_return_route`
+4. **[`macros`]** Renamed the macro-internal function parameter `r` (used with the `r_` prefix) to `__renderer_inner_result` to reduce context pollution
```rust
// Before
@@ -568,9 +568,9 @@ fn render(prev: Previous) { // Implicitly introduces `__renderer_inner_result`
}
```
-5. **\[macros\]** Moved the `entry!`, `route!`, `#[program_setup]` macros into the `extra_macros` feature
+5. **[`macros`]** Moved the `entry!`, `route!`, `#[program_setup]` macros into the `extra_macros` feature
-6. **\[macros\]** The `crate::Next` generated by `gen_program!()` now requires explicit import into the project
+6. **[`macros`]** The `crate::Next` generated by `gen_program!()` now requires explicit import into the project
```rust
use crate::Next;
@@ -584,11 +584,11 @@ fn handle_cmd(args: EntryCmd) -> Next {
gen_program!();
```
-7. **\[macros:comp\]** Renamed `CompletionDispatcher` to `CMDCompletion`
-8. **\[macros:comp\]** Marked `CompletionContext` and `CompletionSuggest` as `#[doc(hidden)]`
-9. **\[macros\]** Renamed `DispatcherNotFound` to `ErrorDispatcherNotFound`
-10. **\[macros\]** Renamed `RendererNotFound` to `ErrorRendererNotFound`
-11. **\[macros\]** Renamed `EmptyResult` to `ResultEmpty`
+7. **[`macros:comp`]** Renamed `CompletionDispatcher` to `CMDCompletion`
+8. **[`macros:comp`]** Marked `CompletionContext` and `CompletionSuggest` as `#[doc(hidden)]`
+9. **[`macros`]** Renamed `DispatcherNotFound` to `ErrorDispatcherNotFound`
+10. **[`macros`]** Renamed `RendererNotFound` to `ErrorRendererNotFound`
+11. **[`macros`]** Renamed `EmptyResult` to `ResultEmpty`
---
@@ -600,9 +600,9 @@ None
#### Optimizations:
-1. **\[core\]** The core library no longer depends on `thiserror`
+1. **[`core`]** The core library no longer depends on `thiserror`
-2. **\[mingling\]** Split the monolithic `general_renderer` feature into separate format-specific features:
+2. **[`mingling`]** Split the monolithic `general_renderer` feature into separate format-specific features:
- `general_renderer` now only includes core serialization support without any specific format
- `general_renderer_full` bundles all available serialization formats
- Individual format features: `json_serde_fmt`, `yaml_serde_fmt`, `toml_serde_fmt`, `ron_serde_fmt`
@@ -610,8 +610,8 @@ None
#### Features:
-1. **\[macros\]** The `gen_program!()` macro now generates `pub fn this() -> &'static Program<#name>` for the generated program type, providing convenient static accessors.
-2. **\[macros\]** The `#[chain]` macro now supports resource injection parameters (2nd to Nth). When you write:
+1. **[`macros`]** The `gen_program!()` macro now generates `pub fn this() -> &'static Program<#name>` for the generated program type, providing convenient static accessors.
+2. **[`macros`]** The `#[chain]` macro now supports resource injection parameters (2nd to Nth). When you write:
```rust
#[chain]
@@ -634,7 +634,7 @@ fn proc(prev: HelloEntry) -> ChainProcess {
}
```
-3. **\[macros\]** The `#[chain]` macro now supports mutable resource injection via the `&mut` syntax. When you write:
+3. **[`macros`]** The `#[chain]` macro now supports mutable resource injection via the `&mut` syntax. When you write:
```rust
#[chain]
@@ -658,9 +658,9 @@ fn proc(_prev: OkEntry) -> ChainProcess {
This allows directly mutating global resources within chain functions without manually calling `modify_res`. Multiple `&mut` parameters are supported with proper nesting.
-4. **\[mingling\]** Added the `dispatch_tree` feature. When enabled, it will automatically generate a prefix tree, improving the command lookup efficiency from O(n) to O(len)
+4. **[`mingling`]** Added the `dispatch_tree` feature. When enabled, it will automatically generate a prefix tree, improving the command lookup efficiency from O(n) to O(len)
-5. **\[mingling\]** Added `mingling::feature` module for runtime feature detection. You can now check which features are enabled at compile time:
+5. **[`mingling`]** Added `mingling::feature` module for runtime feature detection. You can now check which features are enabled at compile time:
```rust
// Example: Check if a feature is enabled
@@ -669,10 +669,10 @@ if mingling::feature::MINGLING_ASYNC {
}
```
-6. **\[core\]** Added `with_hook` functions to embed callback events into the program lifecycle
-7. **\[core\]** Added `user_context.run_hook` configuration item to control whether the program runs hooks
-8. **\[core\]** Added `exec_and_exit`, which will return an `i32` exit code after the program ends
-9. **\[core\]** Added `ExitCodeSetup`, you can control the program's exit code by modifying the `mingling::res::ExitCode` resource
+6. **[`core`]** Added `with_hook` functions to embed callback events into the program lifecycle
+7. **[`core`]** Added `user_context.run_hook` configuration item to control whether the program runs hooks
+8. **[`core`]** Added `exec_and_exit`, which will return an `i32` exit code after the program ends
+9. **[`core`]** Added `ExitCodeSetup`, you can control the program's exit code by modifying the `mingling::res::ExitCode` resource
```rust
#[chain]
@@ -686,9 +686,9 @@ fn your_chain(_prev: Prev) -> Next {
}
```
-10. **\[core\]** `RenderResult` now carries new data `exit_code`
+10. **[`core`]** `RenderResult` now carries new data `exit_code`
-11. **\[core\]** Added `modify` function to `ResourceMarker` for modifying a program's global resources
+11. **[`core`]** Added `modify` function to `ResourceMarker` for modifying a program's global resources
```rust
// Example
@@ -702,10 +702,10 @@ this::().modify_res::(|code| {
});
```
-12. **\[core\]** Added panic catch for program execution.
-13. **\[core\]** Added the `stdout_setting.silence_panic` option, which is disabled by default. When enabled, `Program`'s `panic!` will not output to the console
+12. **[`core`]** Added panic catch for program execution.
+13. **[`core`]** Added the `stdout_setting.silence_panic` option, which is disabled by default. When enabled, `Program`'s `panic!` will not output to the console
-14. **\[macros\]** `#[chain]` now supports a no-return-value mode, which will automatically return `crate::EmptyResult::new(()).to_chain()`
+14. **[`macros`]** `#[chain]` now supports a no-return-value mode, which will automatically return `crate::EmptyResult::new(()).to_chain()`
```rust
#[chain]
@@ -723,9 +723,9 @@ fn my_chain(prev: Prev) -> Next {
#### **BREAKING CHANGES**:
-1. **\[core\]** The signature of `exec` has been changed to `exec(self) -> i32` (previously was `exec(self)`)
+1. **[`core`]** The signature of `exec` has been changed to `exec(self) -> i32` (previously was `exec(self)`)
-2. **\[macros\]** All proc macros that accept a program/group name parameter (e.g. `pack!`, `dispatcher!`, `#[chain]`, `#[program_setup]`, `#[dispatcher_clap]`, `#[derive(Groupped)]`) now parse the name as a `syn::Path` instead of a bare `Ident`. This means:
+2. **[`macros`]** All proc macros that accept a program/group name parameter (e.g. `pack!`, `dispatcher!`, `#[chain]`, `#[program_setup]`, `#[dispatcher_clap]`, `#[derive(Groupped)]`) now parse the name as a `syn::Path` instead of a bare `Ident`. This means:
- You can now use paths like `crate::MyProgram` or `my_crate::MyProgram` in addition to plain `MyProgram`.
- The default program name `ThisProgram` is no longer re-exported or required as an import — generated code references `crate::ThisProgram` directly.
- If you previously imported `ThisProgram` from `crate` only for macro use, that import is no longer needed and can be removed.
@@ -734,7 +734,7 @@ fn my_chain(prev: Prev) -> Next {
use crate::ThisProgram; // Can be removed if not used directly
```
-3. **\[core\]** **\[macros\]** Replace `NextProcess` placeholder with `Next`
+3. **[`core`]** **[`macros`]** Replace `NextProcess` placeholder with `Next`
```rust
// Before
@@ -758,16 +758,16 @@ fn your_chain(_prev: Prev) -> Next {
#### Fixes:
1. Fixed a build failure on **Windows** caused by `mingling_core/src/program.rs`
-2. **\[picker\]** Fixed an issue where the `Pickable` trait for `Yes` and `True` types could not correctly parse explicit boolean `--value true`
+2. **[`picker`]** Fixed an issue where the `Pickable` trait for `Yes` and `True` types could not correctly parse explicit boolean `--value true`
#### Optimizations:
-1. **\[macros\]** Optimized the memory usage of the `gen_program!()` macro: the internal generated enum now uses the smallest possible integer representation (`u8`, `u16`, `u32`, or `u128`) based on the number of packed types, instead of always using `u32`.
+1. **[`macros`]** Optimized the memory usage of the `gen_program!()` macro: the internal generated enum now uses the smallest possible integer representation (`u8`, `u16`, `u32`, or `u128`) based on the number of packed types, instead of always using `u32`.
#### Features:
-1. **\[mingling\]** Added the scaffolding tool `mling`, which can quickly deploy and test your command-line programs
-2. **\[macros\]** Completed the `clap` feature: **Mingling** now supports parsing input using `clap::Parser`
+1. **[`mingling`]** Added the scaffolding tool `mling`, which can quickly deploy and test your command-line programs
+2. **[`macros`]** Completed the `clap` feature: **Mingling** now supports parsing input using `clap::Parser`
```rust
#[derive(Groupped, clap::Parser)]
@@ -783,11 +783,11 @@ struct YourCommandEntry {
}
```
-3. **\[clap\]** Added the `stdout_setting.clap_help_print_behaviour` configuration item to `Program`, used to control the behavior of Clap Help
-4. **\[core\]** Added function `new_with_args` to `Program`
-5. **\[core\]** Added function `dispatch_args_dynamic` to `Program`
-6. **\[core\]** Impl `std::io::Write` trait for `RenderResult`
-7. **\[core\]** Added Help system, which allows binding an event for `--help` to an `Entry` via the `help!` macro
+3. **[`clap`]** Added the `stdout_setting.clap_help_print_behaviour` configuration item to `Program`, used to control the behavior of Clap Help
+4. **[`core`]** Added function `new_with_args` to `Program`
+5. **[`core`]** Added function `dispatch_args_dynamic` to `Program`
+6. **[`core`]** Impl `std::io::Write` trait for `RenderResult`
+7. **[`core`]** Added Help system, which allows binding an event for `--help` to an `Entry` via the `help!` macro
```rust
#[help]
@@ -796,8 +796,8 @@ fn your_command_help(_prev: YourEntry) {
}
```
-8. **\[core\]** Added the function `build_comp_script_to` to the `mingling::build` module: supports outputting completion scripts precisely to a specified directory
-9. **\[macros\]** Added the `route!` macro, which allows quick error routing within the `chain!` function. Usage is as follows:
+8. **[`core`]** Added the function `build_comp_script_to` to the `mingling::build` module: supports outputting completion scripts precisely to a specified directory
+9. **[`macros`]** Added the `route!` macro, which allows quick error routing within the `chain!` function. Usage is as follows:
```rust
// Before
@@ -856,7 +856,7 @@ this::().modify_res(|r: &mut Global| {
});
```
-11. **\[picker\]** For any type that can `Into>`, `.pick()`, `.pick_or()`, and `.pick_or_route()` functions are now supported
+11. **[`picker`]** For any type that can `Into>`, `.pick()`, `.pick_or()`, and `.pick_or_route()` functions are now supported
```rust
// Before
@@ -868,10 +868,10 @@ let name: String = prev.pick("--name").unpack();
#### **BREAKING CHANGES**:
-1. **\[macros\]** Removed macro `dispatcher_render!` from `mingling_macros`
-2. **\[core\]** The `<..., Group>` in `Program` no longer requires `std::fmt::Display`
-3. **\[core\]** Changed `Program` to `Program` (merged the Group and Collect types)
-4. **\[picker\]** When performing `unpack` or `unpack_directly` on the result of the first `pick` of `Picker`, it no longer returns a tuple
+1. **[`macros`]** Removed macro `dispatcher_render!` from `mingling_macros`
+2. **[`core`]** The `<..., Group>` in `Program` no longer requires `std::fmt::Display`
+3. **[`core`]** Changed `Program` to `Program` (merged the Group and Collect types)
+4. **[`picker`]** When performing `unpack` or `unpack_directly` on the result of the first `pick` of `Picker`, it no longer returns a tuple
```rust
// Before
@@ -895,7 +895,7 @@ fn parse_sth(prev: SomeEntry) -> NextProcess {
}
```
-5. **\[core\]** Removed `mingling::marker::NextProcess` and moved its creation process to `gen_program!()`
+5. **[`core`]** Removed `mingling::marker::NextProcess` and moved its creation process to `gen_program!()`
```rust
use mingling::marker::NextProcess; // Remove this
@@ -904,7 +904,7 @@ use mingling::marker::NextProcess; // Remove this
gen_program!();
```
-6. **\[picker\]** Simplified `Picker` logic:
+6. **[`picker`]** Simplified `Picker` logic:
- `Picker` no longer requires the generic parameter `` by default; it only needs it when using `pick_or_route` or `after_or_route`
- Additionally, if no `or_route` operations are used, the `unpack_directly` function is no longer available; `unpack` will directly extract the inner value
@@ -929,15 +929,15 @@ let (name, age) = Picker::new(prev.inner)
.unpack(); // will return Result
```
-7. **\[macros\]** The enum generated by `gen_program!()` no longer has a default variant (`__FallBack`), and the `#[default]` attribute has been removed accordingly.
+7. **[`macros`]** The enum generated by `gen_program!()` no longer has a default variant (`__FallBack`), and the `#[default]` attribute has been removed accordingly.
-8. **\[macros\]** Removed `#[derive(Debug)]` from generated pack types to remove unnecessary trait bounds.
+8. **[`macros`]** Removed `#[derive(Debug)]` from generated pack types to remove unnecessary trait bounds.
-9. **\[macros\]** **\[core\]** **\[mingling\]** Removed the `full` feature from all crates.
+9. **[`macros`]** **[`core`]** **[`mingling`]** Removed the `full` feature from all crates.
---
-### Release 0.1.6 (2026-04-20) **\[YANKED 26.4.24\]**
+### Release 0.1.6 (2026-04-20) **[`YANKED 26.4.24`]**
`Mingling` 0.1.6 primarily focuses on optimizing the writing experience and code completion.
@@ -951,16 +951,16 @@ let (name, age) = Picker::new(prev.inner)
#### Fixes:
-1. **\[core\]** Fixed an issue where the `Powershell` completion script could not be used.
+1. **[`core`]** Fixed an issue where the `Powershell` completion script could not be used.
#### Features:
-1. **\[core\]** Added support for completion descriptions in `Powershell`.
-2. **\[core\]** Added more context-based completion functions, such as `filling_argument` and `typing_argument`. For details, see [Docs.rs](https://docs.rs/mingling/0.1.6/mingling/)
+1. **[`core`]** Added support for completion descriptions in `Powershell`.
+2. **[`core`]** Added more context-based completion functions, such as `filling_argument` and `typing_argument`. For details, see [Docs.rs](https://docs.rs/mingling/0.1.6/mingling/)
#### **BREAKING CHANGES**:
-1. **\[macros\]** The `chain!` macro no longer requires explicit type conversion when routing a type to `Chain`.
+1. **[`macros`]** The `chain!` macro no longer requires explicit type conversion when routing a type to `Chain`.
```rust
// Before
@@ -978,11 +978,11 @@ fn proc(_prev: SomeType) -> NextProcess {
}
```
-2. **\[macros\]** Moved type registration from the `chain!` and `renderer!` macros forward to the `pack!` and `derive Groupped` macros
+2. **[`macros`]** Moved type registration from the `chain!` and `renderer!` macros forward to the `pack!` and `derive Groupped` macros
-3. **\[core\]** **\[macros\]** Added an `async` feature, which is disabled by default. `Mingling` no longer forces a dependency on an Async Runtime.
+3. **[`core`]** **[`macros`]** Added an `async` feature, which is disabled by default. `Mingling` no longer forces a dependency on an Async Runtime.
-4. **\[picker\]** Changed the signature of `pick_or` from `(..., or: TNext)` to `(..., or: impl Into)`
+4. **[`picker`]** Changed the signature of `pick_or` from `(..., or: TNext)` to `(..., or: impl Into)`
---
@@ -1000,15 +1000,15 @@ None
#### Features:
-1. **\[completion\]** Added the completion system, including `ShellContext`, shell suggestion generation, and completion script build support (`build_comp_script_to`)
-2. **\[completion\]** Added `YesOrNo` and `TrueOrFalse` pickable boolean types for completion
-3. **\[core\]** Implemented `mingling::this` function for accessing the current program instance
-4. **\[workspace\]** Added workspace configuration and example projects
-5. **\[docs\]** Added architecture diagram, project branding, and README structure improvements
+1. **[`completion`]** Added the completion system, including `ShellContext`, shell suggestion generation, and completion script build support (`build_comp_script_to`)
+2. **[`completion`]** Added `YesOrNo` and `TrueOrFalse` pickable boolean types for completion
+3. **[`core`]** Implemented `mingling::this` function for accessing the current program instance
+4. **[`workspace`]** Added workspace configuration and example projects
+5. **[`docs`]** Added architecture diagram, project branding, and README structure improvements
#### BREAKING CHANGES:
-1. **\[macros\]** Renamed `DefaultProgram` to `ThisProgram` and removed `ThisProgram` marker type
+1. **[`macros`]** Renamed `DefaultProgram` to `ThisProgram` and removed `ThisProgram` marker type
---
@@ -1020,12 +1020,12 @@ None
#### Features:
-1. **\[picker\]** Added vector pickers for collecting multiple values
-2. **\[picker\]** Added error routing to `Picker` with generic route type
-3. **\[picker\]** Added `after` method for post-processing picked values
-4. **\[macros\]** Added `Groupped` derive macro for automatic trait implementation
-5. **\[macros\]** Added `general_renderer` support with serialization formats (behind feature flag)
-6. **\[macros\]** Simplified attribute parsing in macros
+1. **[`picker`]** Added vector pickers for collecting multiple values
+2. **[`picker`]** Added error routing to `Picker` with generic route type
+3. **[`picker`]** Added `after` method for post-processing picked values
+4. **[`macros`]** Added `Groupped` derive macro for automatic trait implementation
+5. **[`macros`]** Added `general_renderer` support with serialization formats (behind feature flag)
+6. **[`macros`]** Simplified attribute parsing in macros
#### BREAKING CHANGES:
@@ -1037,18 +1037,18 @@ None
#### Fixes:
-1. **\[core\]** Added early exit for renderer not found in execution loop
-2. **\[core\]** Added default error handling methods to `ProgramCollect` trait
+1. **[`core`]** Added early exit for renderer not found in execution loop
+2. **[`core`]** Added default error handling methods to `ProgramCollect` trait
#### Features:
-1. **\[core\]** Replaced typeid-based dispatch with enum-based dispatch for better performance
-2. **\[macros\]** Renamed `chain_struct` macro to `pack`
-3. **\[docs\]** Added documentation for `mingling_core` and public items in parser modules
+1. **[`core`]** Replaced typeid-based dispatch with enum-based dispatch for better performance
+2. **[`macros`]** Renamed `chain_struct` macro to `pack`
+3. **[`docs`]** Added documentation for `mingling_core` and public items in parser modules
#### BREAKING CHANGES:
-1. **\[macros\]** The `chain_struct!` macro has been renamed to `pack!`
+1. **[`macros`]** The `chain_struct!` macro has been renamed to `pack!`
---
@@ -1060,9 +1060,9 @@ None
#### Features:
-1. **\[parser\]** Added argument parser module with `Picker` API
-2. **\[parser\]** Added `Argument` type to picker builtins and exposed `Picker` publicly
-3. **\[core\]** Added `From<()>` implementation for `Flag`
+1. **[`parser`]** Added argument parser module with `Picker` API
+2. **[`parser`]** Added `Argument` type to picker builtins and exposed `Picker` publicly
+3. **[`core`]** Added `From<()>` implementation for `Flag`
#### BREAKING CHANGES:
@@ -1078,14 +1078,14 @@ None
#### Features:
-1. **\[core\]** Replaced `ChainProcess` type alias with an enum for better type safety
-2. **\[core\]** Added `general_renderer` and `full` features
-3. **\[core\]** Removed `ProgramEnd` and `NoChainFound` hint markers
-4. **\[mingling\]** Created the `mingling` umbrella crate with core re-exports and documentation
+1. **[`core`]** Replaced `ChainProcess` type alias with an enum for better type safety
+2. **[`core`]** Added `general_renderer` and `full` features
+3. **[`core`]** Removed `ProgramEnd` and `NoChainFound` hint markers
+4. **[`mingling`]** Created the `mingling` umbrella crate with core re-exports and documentation
#### BREAKING CHANGES:
-1. **\[core\]** `ChainProcess` changed from a type alias to an enum; conversion code may need updating
+1. **[`core`]** `ChainProcess` changed from a type alias to an enum; conversion code may need updating
---
@@ -1095,10 +1095,10 @@ Initial release of the Mingling framework.
#### Features:
-1. **\[core\]** Basic chain processing pipeline with `#[chain]` and `#[renderer]` macros
-2. **\[macros\]** `program!` for program generation, `chain_struct!` for wrapper types, `dispatcher!` for command routing
-3. **\[core\]** `Program` struct with dispatcher registration and execution
-4. **\[core\]** `RenderResult` for terminal output buffering
-5. **\[docs\]** README and license files
+1. **[`core`]** Basic chain processing pipeline with `#[chain]` and `#[renderer]` macros
+2. **[`macros`]** `program!` for program generation, `chain_struct!` for wrapper types, `dispatcher!` for command routing
+3. **[`core`]** `Program` struct with dispatcher registration and execution
+4. **[`core`]** `RenderResult` for terminal output buffering
+5. **[`docs`]** README and license files
---
--
cgit