Skip to content

Commit 5e75f83

Browse files
committed
docs(changelog): record native trait-callback return support
1 parent 8f376c6 commit 5e75f83

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- **Trait-callback host returns accept the native binding object across the dynamic backends
13+
(pyo3, magnus, php, extendr).** Host-implementable trait callbacks already received native
14+
arguments (#142/#143), but the return value was still marshalled through a mapping/JSON path that
15+
rejected the binding's native result object even though the generated host interface advertised
16+
that type. Each dynamic backend's return path now tries the native object first
17+
(`extract::<Binding>()` / `TryConvert` / `FromZval` / `ExternalPtr` unwrap) and converts via
18+
`From<Binding> for Core`, falling back to the existing dict/array/hash/JSON path. The native path
19+
is gated on the binding→core conversion actually being generated (`convertible_types`), and extendr
20+
additionally gates on extendr-representability so non-representable rich types keep the JSON path. A
21+
shared `native_marshalled_struct_returns` classifier mirrors the param-side allowlist. On pyo3 the
22+
Protocol method also changes from `async def` to `def`, matching the `spawn_blocking` bridge that
23+
never awaited it. Resolves #153.
24+
1025
### Fixed
1126

1227
- **Per-variant constructors now box `Box<T>` fields.** When a data enum's struct variant has a

0 commit comments

Comments
 (0)