[GH-ISSUE #107] Svelte Reconciler ? #794

Closed
opened 2026-03-14 08:35:51 +03:00 by kerem · 8 comments
Owner

Originally created by @julien-blanchon on GitHub (Aug 29, 2025).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/107

Anything about a Svelte Reconciler ?

Originally created by @julien-blanchon on GitHub (Aug 29, 2025). Original GitHub issue: https://github.com/anomalyco/opentui/issues/107 Anything about a Svelte Reconciler ?
kerem 2026-03-14 08:35:51 +03:00
  • closed this issue
  • added the
    feature
    label
Author
Owner

@SkrOYC commented on GitHub (Sep 4, 2025):

I'm currently exploring building it after getting into what OpenTUI is and knowing it's based on Zig (I love Bun).
Of course this is just me wanting to do it and researching, scaffolding it as a side project. I hope I will contribute either leading the effort or helping an existing one

<!-- gh-comment-id:3253495449 --> @SkrOYC commented on GitHub (Sep 4, 2025): I'm currently exploring building it after getting into what OpenTUI is and knowing it's based on Zig (I love Bun). Of course this is just me wanting to do it and researching, scaffolding it as a side project. I hope I will contribute either leading the effort or helping an existing one
Author
Owner

@julien-blanchon commented on GitHub (Sep 4, 2025):

Would love to see that @SkrOYC !

<!-- gh-comment-id:3254441562 --> @julien-blanchon commented on GitHub (Sep 4, 2025): Would love to see that @SkrOYC !
Author
Owner

@slowsage commented on GitHub (Nov 4, 2025):

Submitted #261 as a draft.

It integrates at the DOM level - the subset of the DOM that svelte compiles into (analyzed the svelte 5 source to get call-graph in python script under packages/svelte/analysis).

<!-- gh-comment-id:3483190654 --> @slowsage commented on GitHub (Nov 4, 2025): Submitted #261 as a draft. It integrates at the DOM level - the subset of the DOM that svelte compiles into (analyzed the svelte 5 source to get call-graph in python script under `packages/svelte/analysis`).
Author
Owner

@kommander commented on GitHub (Nov 4, 2025):

Cool! I really appreciate bindings for other frameworks and languages. As mentioned in #236 I cannot take any more into the mono repo as I would be a blocker for maintenance. But I would be very happy to have these mentioned in the readme and support from the core with what is needed.

<!-- gh-comment-id:3486452046 --> @kommander commented on GitHub (Nov 4, 2025): Cool! I really appreciate bindings for other frameworks and languages. As mentioned in #236 I cannot take any more into the mono repo as I would be a blocker for maintenance. But I would be very happy to have these mentioned in the readme and support from the core with what is needed.
Author
Owner

@andrewgazelka commented on GitHub (Dec 13, 2025):

Some technical notes on the Svelte approach for anyone picking this up:

Why Svelte is harder than React/Vue/Solid:

Framework Custom Renderer API
React react-reconciler
Vue createRenderer() from @vue/runtime-core
Solid createRenderer() from solid-js/universal
Svelte No official API

Svelte compiles components to direct DOM calls at build time, so there's no reconciler to swap out.

Two approaches:

  1. DOM shim (what #261 attempted) - Implement a minimal DOM API (document.createElement, appendChild, etc.) that maps to OpenTUI renderables. Svelte's compiled output calls these and unknowingly renders to OpenTUI.

  2. Compile target - Like svelte-native, create a custom compile target that emits OpenTUI calls instead of DOM calls. More work but cleaner.

The DOM shim approach seems viable since Svelte 5's compiled output uses a relatively small subset of DOM APIs. The closed PR #261 had analysis scripts to identify exactly which DOM methods need shimming.

Since the maintainers prefer external packages, this could live as opentui-svelte or @opentui/svelte-external.

<!-- gh-comment-id:3649946635 --> @andrewgazelka commented on GitHub (Dec 13, 2025): Some technical notes on the Svelte approach for anyone picking this up: **Why Svelte is harder than React/Vue/Solid:** | Framework | Custom Renderer API | |-----------|---------------------| | React | `react-reconciler` | | Vue | `createRenderer()` from `@vue/runtime-core` | | Solid | `createRenderer()` from `solid-js/universal` | | Svelte | ❌ No official API | Svelte compiles components to direct DOM calls at build time, so there's no reconciler to swap out. **Two approaches:** 1. **DOM shim** (what #261 attempted) - Implement a minimal DOM API (`document.createElement`, `appendChild`, etc.) that maps to OpenTUI renderables. Svelte's compiled output calls these and unknowingly renders to OpenTUI. 2. **Compile target** - Like `svelte-native`, create a custom compile target that emits OpenTUI calls instead of DOM calls. More work but cleaner. The DOM shim approach seems viable since Svelte 5's compiled output uses a relatively small subset of DOM APIs. The closed PR #261 had analysis scripts to identify exactly which DOM methods need shimming. Since the maintainers prefer external packages, this could live as `opentui-svelte` or `@opentui/svelte-external`.
Author
Owner

@slowsage commented on GitHub (Jan 5, 2026):

Created repo for closed PR #261. Open to contributions.

<!-- gh-comment-id:3710441498 --> @slowsage commented on GitHub (Jan 5, 2026): Created [repo](https://github.com/slowsage/opentui-svelte) for closed PR #261. Open to contributions.
Author
Owner

@msmps commented on GitHub (Jan 7, 2026):

We're focusing the main opentui monorepo on only @opentui/core, @opentui/react, and @opentui/solid. Language bindings should be maintained as independent repositories.

See #489 for details

<!-- gh-comment-id:3719311348 --> @msmps commented on GitHub (Jan 7, 2026): We're focusing the main opentui monorepo on only **@opentui/core, @opentui/react, and @opentui/solid**. Language bindings should be maintained as independent repositories. See #489 for details
Author
Owner

@XhstormR commented on GitHub (Feb 10, 2026):

https://github.com/slowsage/opentui-svelte

<!-- gh-comment-id:3876825326 --> @XhstormR commented on GitHub (Feb 10, 2026): https://github.com/slowsage/opentui-svelte
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#794
No description provided.