Sign in

    websys

    MoonBit bindings for Web APIs (DOM, HTML, Canvas, WebGL, etc.)

    web
    dom
    browser
    wasm
    ffi
    Download zip
    Author
    Version
    0.3.0
    License
    MIT
    Last updated
    8 months ago
    Downloads
    37

    #websys

    MoonBit bindings for Web APIs (DOM, HTML, Canvas, WebGL, etc.)

    #Overview

    This package provides type-safe MoonBit bindings for browser APIs, similar to Rust's web-sys crate.

    #Design Philosophy

    Unlike Rust's web-sys which uses Cargo feature flags to include/exclude APIs, this MoonBit implementation includes all APIs in a single package. MoonBit's powerful Dead Code Elimination (DCE) automatically removes unused types from the final binary.

    AspectRust web-sysMoonBit websys
    Unused type removalManual (feature flags)Automatic (DCE)
    ConfigurationCargo.toml featuresJust import
    API coverage~3,500 definitions~3,500 definitions

    #Installation

    moon add dijdzv/websys

    #Generation

    This package is auto-generated from WebIDL specifications using webidl-bindgen.mbt:

    # Install dependencies (first time only) bun install # Regenerate bindings just generate

    Source specifications: @webref/idl

    #License

    MIT License

    ⚠️ Package is too large to be displayed

    This package contains over 4973 items.

    Source Files