rux-shell 0.6.1

Rux runtime shell: window, GPU surface, input, and frame loop. Internal to Rux; the supported entry point is the ruxlang crate.
Documentation
[package]

name = "rux-shell"

edition.workspace = true

version.workspace = true

license.workspace = true

repository.workspace = true

description = "Rux runtime shell: window, GPU surface, input, and frame loop. Internal to Rux; the supported entry point is the ruxlang crate."

readme = "README.md"

keywords = ["ui", "window", "gpu", "winit"]

categories = ["gui"]



# docs.rs documents the host target only. Half of this crate is behind

# `cfg(target_arch = "wasm32")` (the IME, the hidden input that raises a phone's

# keyboard, the clipboard), including `start_web`, `resize_web`,

# `set_web_source` and `diagnose_web_source`, so without the wasm target in this

# list the published docs would simply not mention the web shell exists.

#

# This is the only crate that needs it: every other published crate has no

# target-gated code at all.

[package.metadata.docs.rs]

targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]



[dependencies]

winit.workspace = true

vello.workspace = true

rux-layout.workspace = true

rux-paint.workspace = true

rux-runtime.workspace = true

rux-text.workspace = true

rux-reactive.workspace = true

# `std::time::Instant` panics on wasm; web-time swaps in the browser clock there

# and re-exports std everywhere else. winit already depends on it, so this adds

# no weight; it just lets our code name the same type winit's API expects.

web-time = "1.1"



# Native-only platform services. None of these exist in a browser:

#   pollster   blocks on a future, and a wasm main thread must not block, so the

#              web build awaits the same futures instead.

#   notify     watches the filesystem for hot reload; there is no filesystem,

#              and the playground editor supplies new source directly.

#   arboard    talks to the OS clipboard; the browser's is async and permissioned.

#   accesskit  wraps the per-platform accessibility APIs (UI Automation, AT-SPI,

#              NSAccessibility). The web already has an accessibility tree of its

#              own and accesskit_winit has no adapter for it.

# Everything above this line (window, input, focus, layout, paint) is shared.

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]

pollster.workspace = true

notify = "8.2.0"

arboard.workspace = true

accesskit = "0.24.1"

accesskit_winit = "0.33.2"



# The browser's stand-ins: a task spawner instead of blocking, and the

# canvas/console bindings winit and the loader need.

[target.'cfg(target_arch = "wasm32")'.dependencies]

wasm-bindgen-futures = "0.4"

wasm-bindgen = "0.2"

# The extra features past the canvas are the soft-keyboard sink: a browser only

# raises a phone's keyboard for a focused DOM element, and a `<canvas>` is not

# one, so the shell keeps a real `<input>` over the field it is editing.

web-sys = { version = "0.3", features = [

    "HtmlCanvasElement",

    "console",

    "Clipboard",

    "Navigator",

    "CompositionEvent",

    "CssStyleDeclaration",

    "Document",

    "Element",

    "Event",

    "EventTarget",

    "HtmlElement",

    "HtmlInputElement",

    "MediaQueryList",

    "Node",

    "Window",

    # The router's web half: read the path the page was opened at, push an entry

    # per navigation, and hear the browser's own Back and Forward.

    "History",

    "Location",

    "PopStateEvent",

] }