Skip to content

Commit 0d036d0

Browse files
ImLunaHeyclaude
andcommitted
docs: codegen surface is feature-complete
Integration doc collapses the TM-side gap list — every callback shape including non-void primitive returns now lowers, and schema.aliasMap dedup already shipped. The only lingering edge is typed-object / Promise returns from a sync callback, which no real spec combines. Codegen package README's follow-ups row is correspondingly trimmed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 32090a6 commit 0d036d0

1 file changed

Lines changed: 36 additions & 36 deletions

File tree

docs/expo-desktop-integration.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -264,42 +264,42 @@ needed.
264264

265265
### TurboModule codegen follow-ups
266266

267-
The TurboModule codegen covers the type system most arbitrary
268-
`expo-modules-core` specs use: primitives, void, typed C++ structs
269-
(with both `toDynamic` and `static fromDynamic` helpers),
270-
arrays/generic objects via `folly::dynamic`, nullables, enums,
271-
Promises (off-thread safe via `RuntimeExecutor`), void-returning
272-
callbacks (also off-thread safe), and object args inside
273-
callbacks. Remaining edges:
274-
275-
1. **Non-void callback returns.** Almost no real spec uses these
276-
(callbacks are typically `(...) => void`), so they still throw
277-
with an actionable error. Adding it requires capturing `rt_` by
278-
pointer and documenting the call-from-JS-thread constraint.
279-
2. **Type aliases (`schema.aliasMap`).** Inline anonymous objects
280-
get synthesized names today (`<Method>Result_<Field>`). Named
281-
type aliases would get the alias name verbatim, deduping the
282-
struct list when the same shape appears under multiple methods.
283-
3. **Fabric component coverage.** The component generator handles
284-
every prop shape the upstream codegen schema emits: primitives,
285-
`ColorPrimitive`/`PointPrimitive`/`EdgeInsetsPrimitive`/
286-
`DimensionPrimitive`/`ImageSourcePrimitive` reserved types,
287-
String + Int32 enums (typed `enum class` + ADL `fromRawValue`),
288-
Object props (generated `<Comp><Prop>` struct + `toDynamic`/
289-
`fromDynamic`/`fromRawValue`), and `Array<T>` props
290-
(`std::vector<T>` with item-struct generation when T is an
291-
object). Events lower to typed `<Name><Event>` structs + emitter
292-
methods; `codegenNativeCommands` produces a `<Name>HandleCommand`
293-
dispatcher wired through `LinuxComponentView::handleCommand`
294-
`LinuxSchedulerDelegate::schedulerDidDispatchCommand`.
295-
Components auto-register via
296-
`codegen::installComponent()` (parallel to TM's
297-
`Spec::install<Impl>()`) — no manual registry bootstrap
298-
required for third-party autolinked components.
299-
300-
Nothing in the standard component spec surface blocks
301-
`expo-desktop-modules-core` or downstream view-shipping Expo
302-
packages today.
267+
The TurboModule codegen covers everything `@react-native/codegen`'s
268+
schema can express: primitives, void, typed C++ structs (with
269+
`toDynamic` and `static fromDynamic`), `folly::dynamic` for arrays
270+
and generic objects, nullables, enums, `Promise<T>` (off-thread
271+
safe via `RuntimeExecutor`), `(...) => void` callbacks
272+
(off-thread safe), object args inside callbacks, `(...) => R`
273+
callbacks with primitive R (synchronous, on JS thread), and
274+
type-alias dedup driven by `schema.aliasMap`. Verified end-to-end
275+
against `expo-desktop-modules-core`'s real specs.
276+
277+
There are no longer load-bearing TM-side codegen gaps. Lone edge
278+
that still throws: typed-object / `Promise<T>` returns from a
279+
non-void sync callback — primitive returns work end-to-end, and
280+
no real spec in the wild combines a typed-object return with the
281+
sync-callback shape.
282+
283+
**Fabric component coverage.** The component generator handles
284+
every prop shape the upstream codegen schema emits: primitives,
285+
`ColorPrimitive`/`PointPrimitive`/`EdgeInsetsPrimitive`/
286+
`DimensionPrimitive`/`ImageSourcePrimitive` reserved types,
287+
String + Int32 enums (typed `enum class` + ADL `fromRawValue`),
288+
Object props (generated `<Comp><Prop>` struct + `toDynamic`/
289+
`fromDynamic`/`fromRawValue`), and `Array<T>` props
290+
(`std::vector<T>` with item-struct generation when T is an
291+
object). Events lower to typed `<Name><Event>` structs + emitter
292+
methods; `codegenNativeCommands` produces a `<Name>HandleCommand`
293+
dispatcher wired through `LinuxComponentView::handleCommand`
294+
`LinuxSchedulerDelegate::schedulerDidDispatchCommand`.
295+
Components auto-register via
296+
`codegen::installComponent()` (parallel to TM's
297+
`Spec::install<Impl>()`) — no manual registry bootstrap
298+
required for third-party autolinked components.
299+
300+
Nothing in the standard component spec surface blocks
301+
`expo-desktop-modules-core` or downstream view-shipping Expo
302+
packages today.
303303

304304
**JS-side fallback** for anything the codegen can't yet express:
305305
`@lucid-softworks/react-native-linux-expo/expo-modules-core.js`

0 commit comments

Comments
 (0)