Skip to content

Commit e6a9529

Browse files
committed
Remove legacy WebUI sources and examples
1 parent 8c74f01 commit e6a9529

73 files changed

Lines changed: 88 additions & 18888 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/PURE_ZIG_REFACTOR.md

Lines changed: 88 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ protocol input never panics.
247247

248248
### 5. Delete the old implementation and publish a breaking release
249249

250-
- Delete `src/c.zig`, compatibility tuple files, and all C ABI tests.
251-
- Migrate retained examples and delete duplicate examples that only demonstrate
252-
the old API.
250+
- Deleted `src/c.zig`, `src/webui.zig`, `src/tests.zig`, both compatibility
251+
tuple files, and the legacy examples.
252+
- Retain the pure Zig minimal example.
253253
- Document only the new API and lifecycle in the README.
254254
- Publish a new major or alpha release. Naming can be decided then and does not
255255
block implementation.
@@ -272,6 +272,91 @@ protocol input never panics.
272272
| `interface*` | Delete |
273273
| `newWindowWithId()` | Delete; `App` owns IDs |
274274

275+
## Upstream WebUI API Coverage Ledger
276+
277+
This ledger tracks upstream WebUI `2.5.0-beta.4` capabilities independently
278+
of the implementation phases. Upstream C names are identifiers for
279+
traceability, not a commitment to reproduce the C API shape in Zig.
280+
Coverage is determined only from `src/root.zig` and its reachable pure Zig
281+
modules. Deleted legacy wrapper, test, and example files do not count as
282+
implementations.
283+
284+
### Missing or Partial Backend Capabilities
285+
286+
| Upstream API | Current gap |
287+
|---|---|
288+
| `webui_bind()` | `Window.bind` supports explicit `webui.call()` calls, but the bridge does not automatically dispatch DOM events from an element with the same ID to that binding. |
289+
| `webui_get_float()`, `webui_get_float_at()` | `Call.float()` is not implemented. |
290+
| `webui_return_float()`, `webui_return_bool()` | `Call.reply()` can encode these values as text, but typed `replyFloat()` and `replyBool()` helpers are not implemented. |
291+
| `webui_show()`, `webui_set_root_folder()`, `webui_set_file_handler()`, `webui_set_file_handler_window()` | Content and resource handling can only be selected when creating a window; replacing them at runtime is not implemented. |
292+
| `webui_show_client()` | `Client` cannot replace the content of only one connected browser. |
293+
| `webui_is_shown()` | There is no window-level connected/shown query. |
294+
| `webui_set_config(asynchronous_response)` | A `Call` response must be completed during the binding handler lifetime. |
295+
| `webui_set_config(show_wait_connection)`, `webui_set_timeout()` | `Window.open()` does not optionally wait for a browser connection. |
296+
| `webui_set_config(ui_event_blocking)`, `webui_set_event_blocking()` | Per-window event scheduling control is not exposed. |
297+
| `webui_set_config(folder_monitor)` | Directory change monitoring and automatic browser reload are not implemented. |
298+
| `webui_set_config(use_cookies)` | Client authorization uses capability URLs; optional cookie-based authorization is not implemented. |
299+
| `webui_set_default_root_folder()` | There is no application-wide default directory content setting. |
300+
| `webui_set_logger()` | There is no caller-provided logging callback. |
301+
| `webui_set_icon()`, `webui_set_icon_file()` | Window icon configuration is not implemented. |
302+
| `webui_open_url()` | The internal OS URL opener is not exposed as a general public API. |
303+
| `webui_get_best_browser()`, `webui_browser_exist()`, `webui_show_browser()`, `webui_set_browser_folder()` | Browser discovery, selection, and custom executable locations are not implemented. |
304+
| `webui_set_custom_parameters()` | Custom browser command-line arguments are not implemented. |
305+
| `webui_set_kiosk()`, `webui_focus()`, `webui_minimize()`, `webui_maximize()`, `webui_set_hide()` | Browser window mode and lifecycle controls are not implemented. |
306+
| `webui_set_resizable()`, `webui_set_size()`, `webui_set_minimum_size()`, `webui_set_position()`, `webui_set_center()` | Browser window geometry controls are not implemented. |
307+
| `webui_set_frameless()`, `webui_set_transparent()` | Frameless and transparent browser window modes are not implemented. |
308+
| `webui_set_high_contrast()`, `webui_is_high_contrast()` | High-contrast mode control and detection are not implemented. |
309+
| `webui_set_profile()`, `webui_delete_profile()`, `webui_delete_all_profiles()` | Managed browser profiles are not implemented. |
310+
| `webui_set_proxy()` | Browser proxy configuration is not implemented. |
311+
| `webui_get_parent_process_id()`, `webui_get_child_process_id()` | Browser process tracking is not implemented. |
312+
| `webui_set_public()` | A guarded public-listening option with Origin validation and explicit limits is not implemented. |
313+
| `webui_set_tls_certificate()` | Caller-provided TLS certificate and private-key configuration is not implemented. |
314+
| `webui_set_runtime()` | Deno, Node.js, and Bun execution for served files is not implemented. |
315+
| `webui_show_wv()`, `webui_set_close_handler_wv()`, `webui_get_hwnd()`, `webui_win32_get_hwnd()` | Native WebView hosting and native window handles are outside the pure Zig browser core. |
316+
317+
### Missing Browser Bridge APIs
318+
319+
The current browser object implements `webui.call()` and
320+
`webui.isConnected()`. These upstream bridge APIs are not implemented:
321+
322+
| Upstream bridge API | Current gap |
323+
|---|---|
324+
| `webui.setLogging()` | Runtime bridge logging control is not exposed. |
325+
| `webui.setEventCallback()` and `webui.event` | Browser-side connected and disconnected callbacks are not exposed. |
326+
| `webui.isHighContrast()` | Browser-side high-contrast detection is not exposed. |
327+
| `webui.allowNavigation()` | Navigation interception cannot be changed by browser JavaScript at runtime. |
328+
329+
`webui.encode()` and `webui.decode()` are intentionally replaced by the
330+
browser's `btoa()` and `atob()` functions. The upstream bridge's
331+
`callCore()` method remains an internal implementation detail.
332+
333+
### Intentional Zig Replacements
334+
335+
The following upstream methods are covered by the current Zig design and are
336+
not implementation gaps:
337+
338+
| Upstream API | Zig replacement |
339+
|---|---|
340+
| `webui_new_window()`, `webui_new_window_id()`, `webui_get_new_window_id()` | `App.createWindow()` and application-owned IDs. |
341+
| `webui_show()`, `webui_start_server()`, `webui_get_url()` | Initial `Content`, `App.start()`, `Window.open()`, and `Window.url()`. Runtime content replacement remains listed above. |
342+
| `webui_wait()`, `webui_wait_async()` | `Running.wait()` used directly or through `std.Io` concurrency. |
343+
| `webui_close()`, `webui_destroy()`, `webui_exit()`, `webui_clean()` | `Window.close()`, `Running.stop()`, and `App.deinit()`. |
344+
| `webui_set_context()`, `webui_get_context()` | Binding and event-handler `user_data`. |
345+
| `webui_get_count()`, `webui_get_size()`, `webui_get_size_at()` | `Call.arguments.len` and `Call.bytes(index).len`. |
346+
| `webui_get_string()`, `webui_get_string_at()`, `webui_get_int()`, `webui_get_int_at()`, `webui_get_bool()`, `webui_get_bool_at()` | `Call.string()`, `Call.int()`, and `Call.boolean()`. |
347+
| `webui_return_string()`, `webui_return_int()` | `Call.reply()` and `Call.replyInt()`. |
348+
| `webui_run()`, `webui_script()` | `Window.run()` and `Window.eval()`. |
349+
| `webui_run_client()`, `webui_script_client()` | `Client.run()` and `Client.eval()`. |
350+
| `webui_close_client()`, `webui_navigate_client()`, `webui_send_raw_client()` | `Client.close()`, `Client.navigate()`, and `Client.sendRaw()`. |
351+
| `webui_navigate()`, `webui_send_raw()` | `Window.navigate()` and `Window.sendRaw()`. |
352+
| `webui_set_config(multi_client)` | `WindowOptions.max_clients`. |
353+
| `webui_set_port()`, `webui_get_port()`, `webui_get_free_port()` | `App.Options.port`, including `0` for automatic selection, and the running window URL. |
354+
| `webui_set_root_folder()`, `webui_set_file_handler()`, `webui_set_file_handler_window()`, `webui_return_http()` | Initial `.directory` or `.custom` content and `Response`. Runtime replacement remains listed above. |
355+
| `webui_get_mime_type()` | Linsang resource handling. |
356+
| `webui_encode()`, `webui_decode()`, `webui_malloc()`, `webui_free()`, `webui_memcpy()` | Zig standard library and allocators. |
357+
| `webui_get_last_error_number()`, `webui_get_last_error_message()` | Zig error unions. |
358+
| `webui_interface_*()` | Permanently omitted with the C ABI compatibility layer. |
359+
275360
## Tests and Completion Criteria
276361

277362
Keep at least one direct test for every non-trivial parser. The final gate is:

examples/advanced_window/index.html

Lines changed: 0 additions & 271 deletions
This file was deleted.

0 commit comments

Comments
 (0)