You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blog/2026-02-28-v0.7.0-release.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ tags: [release]
6
6
7
7
# Supercharge Rust functions with implicit arguments using CGP v0.7.0
8
8
9
-
[CGP v0.7.0](https://crates.io/crates/cgp) has been released, bringing a major expansion to the CGP macro toolkit. The centerpiece of this release is a suite of new annotations — `#[cgp_fn]`, `#[implicit]`, `#[uses]`, `#[extend]`, `#[use_provider]`, and `#[use_type]` — that let you write context-generic code in plain function syntax with dramatically less boilerplate than before.
9
+
[**CGP v0.7.0**](https://crates.io/crates/cgp) has been released, bringing a major expansion to the CGP macro toolkit. The centerpiece of this release is a suite of new annotations — `#[cgp_fn]`, `#[implicit]`, `#[uses]`, `#[extend]`, `#[use_provider]`, and `#[use_type]` — that let you write context-generic code in plain function syntax with dramatically less boilerplate than before.
10
10
11
11
<!-- truncate -->
12
12
@@ -344,11 +344,11 @@ The word "implicit" may raise a flag for developers familiar with Scala's implic
344
344
345
345
## New area calculation tutorials
346
346
347
-
To accompany this release, two new **area calculation tutorials** have been published that build up the full CGP feature set from first principles.
347
+
To accompany this release, two new [**area calculation tutorials**](/docs/tutorials/area-calculation/) have been published that build up the full CGP feature set from first principles.
348
348
349
-
The **Context-Generic Functions** tutorial starts from plain Rust and introduces `#[cgp_fn]`, `#[implicit]`, and `#[uses]`. It walks through the full desugaring of `rectangle_area` into Rust traits and blanket implementations, explains the `HasField`-based zero-cost field access model, and compares CGP's implicit arguments to Scala's implicit parameters for readers coming from other ecosystems.
349
+
The [**Context-Generic Functions**](/docs/tutorials/area-calculation/context-generic-functions) tutorial starts from plain Rust and introduces `#[cgp_fn]`, `#[implicit]`, and `#[uses]`. It walks through the full desugaring of `rectangle_area` into Rust traits and blanket implementations, explains the `HasField`-based zero-cost field access model, and compares CGP's implicit arguments to Scala's implicit parameters for readers coming from other ecosystems.
350
350
351
-
The **Static Dispatch** tutorial introduces a second shape — the circle — to motivate a unified `CanCalculateArea` interface. It demonstrates Rust's coherence restrictions as a concrete problem, then resolves them using `#[cgp_component]` and named providers defined with `#[cgp_impl]`. Finally, it covers `delegate_components!` for configurable static dispatch and `#[use_provider]` for composing higher-order providers.
351
+
The [**Static Dispatch**](/docs/tutorials/area-calculation/static-dispatch) tutorial introduces a second shape — the circle — to motivate a unified `CanCalculateArea` interface. It demonstrates Rust's coherence restrictions as a concrete problem, then resolves them using `#[cgp_component]` and named providers defined with `#[cgp_impl]`. Finally, it covers `delegate_components!` for configurable static dispatch and `#[use_provider]` for composing higher-order providers.
352
352
353
353
Both tutorials are designed to be read sequentially and assume no prior knowledge of CGP beyond basic Rust familiarity.
0 commit comments