v1.2.3UI BridgeBSD-2-Clause

Schema-driven UI bridge rendering Bud HTML components directly from Hyle canonical data schemas (hyle_schema_desc_t). Canonical header is <hyle-bud/hyle-bud.h>.

GitHub
git clone https://github.com/tty-pt/libhyle-bud

libhyle-bud logo

libhyle-bud

npm C99 BSD-2-Clause Hyle ร— Bud bridge

Schema-driven UI bridge rendering Bud HTML components directly from Hyle canonical data schemas (hyle_schema_desc_t). Canonical header is <hyle-bud/hyle-bud.h>.

libhyle-bud is the designated junction between libhyle (data schemas) and libbud (declarative UI). It powers every filter, form, omni-picker, and sortable table across native SSR and browser WASM.


1. Quickstart

Render a complete HTML form directly from a C schema descriptor:

#include <hyle-bud/hyle-bud.h>
#include <bud/bud.h>
#include <stdio.h>

typedef struct {
    char title[256];
    int year;
} album_t;

static const hyle_schema_desc_t album_fields[] = {
    FIELD_TEXT(title, album_t),
    FIELD_INT(year, album_t),
    FIELD_END
};

int main(void) {
    // Generate full POST form from schema descriptor
    bud_node *form = hyle_bud_form(
        album_fields, NULL, "/album/save", "/", "Save",
        NULL, NULL, NULL
    );

    char *html = bud_render_html(form);
    printf("%s\n", html);

    bud_free_string(html);
    bud_free(form);
    return 0;
}

Compile and link:

cc form_demo.c $(pkg-config --cflags --libs hyle-bud) -o form_demo

2. Component Architecture & Progressive Enhancement

libhyle-bud renders rich UI controls that degrade gracefully to standard HTML5:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Filter Bar (hyle_bud_filter_group)                                     โ”‚
โ”‚ [ Search text... ]  [ Category: All โ–ผ ]  [ Status: Active โ–ผ ]  [Apply] โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Listing Table (hyle_bud_table)                                         โ”‚
โ”‚ Title โ–ฒ                     Year      Status        Actions            โ”‚
โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”‚
โ”‚ Ain't Talkin' 'Bout Love    1978      Published     [Edit] [Delete]    โ”‚
โ”‚ Jump                        1984      Published     [Edit] [Delete]    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  • No-JS Full Compatibility: Filters submit plain GET forms, pagination uses URL query strings, and mutations submit standard POST bodies.
  • WASM Interactive Layer: When browser WASM executes, event listeners attach directly to existing server-rendered HTML elements, streaming fine-grained DOM patch operations without full page reloads.

3. Core API Reference

ComponentKey FunctionsDescription
Forms & Inputshyle_bud_form, hyle_bud_text_input, hyle_bud_multiselect_fieldGenerate complete POST forms and typed inputs from schema descriptors
Filters & Groupshyle_bud_filter, hyle_bud_filter_group, hyle_bud_filter_scopedRender schema-driven search inputs, dropdowns, and multi-filter bars
Listing Tableshyle_bud_table, hyle_bud_table_header, hyle_bud_table_actions, hyle_bud_paginationSortable tables with uniform row activation, link/submit actions, and paging
Omni-Pickershyle_bud_picker_field, hyle_bud_action_picker, hyle_bud_picker_slotsFaceted search dropdowns with infinite-scroll option chunking
State Hydrationhyle_bud_state_apply, hyle_bud_state_overlay_from_descUnpack bud-state JSON into C memory with zero-copy stride layouts

๐Ÿ‘‰ For detailed picker conventions, see docs/PICKERS.md.


4. Installation & Build

Prebuilt Packages

Prebuilt packages are distributed on tty.pt for Linux (APT / Alpine / Arch / Fedora-RHEL), macOS (Homebrew), Windows (winget / MSYS2), and OpenBSD, and mobile static sysroots for Android (https://tty.pt/android/ โ€” arm64-v8a, armeabi-v7a, x86_64) and iOS (https://tty.pt/ios/ โ€” libhyle-bud.xcframework). Follow the installation instructions and use libhyle-bud as the package name.

Build from Source

Builds use shared libstele rules (include ttypt/include.mk):

make                  # builds lib/libhyle-bud.so
make test             # run verification tests
sudo make install     # install headers and library to system

5. JavaScript & WebAssembly Bindings (@tty-pt/hyle-bud)

For browser, Node.js, and edge runtimes, libhyle-bud ships an isomorphic WebAssembly bridge on npm:

npm config set @tty-pt:registry https://tty.pt/npm/
npm install @tty-pt/hyle-bud

See npm/README.md for the full TypeScript and WebAssembly API reference.


License

BSD 2-Clause License. Copyright (c) 2026, tty-pt. See LICENSE.

Maintained by:tty-pt