MCPcopy Index your code
hub / github.com/deft-ui/deft

github.com/deft-ui/deft @deft-sys-v0.13.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release deft-sys-v0.13.0 ↗ · + Follow
2,476 symbols 5,176 edges 199 files 157 documented · 6% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Introduction

Deft is a framework for building desktop and mobile applications with Rust and JavaScript.

crates.io

Features

  • Hybrid programming with Rust and JavaScript
  • Non-webview core
  • Unified JavaScript engine and rendering engine
  • Themes support
  • Support React/Vue/Solid or any framework that supports custom render

Limits

  • Not all CSS properties are supported, see documentation for more details.
  • Accessibility is not yet available.
  • JavaScript debugger is not yet available.

Component Gallery

Live Demo(WASM)

Quick Start

npm create deft@latest hello-deft
cd hello-deft
npm install
npm run dev

Documentation

Demos

Platforms

Platform Versions Supported
Windows 10+
Linux X11 & Wayland
MacOS 10.12+
HarmonyOS 5+ ✅experimental
Android 6+ ✅experimental
iOS - ✅experimental
WebAssembly - ✅experimental

Develop

Prerequisites

Make sure Rust, Node.js and Clang14+ installed.

Some extra packages need to be installed on Linux.

apt install build-essential libssl-dev libclang-dev libc++-dev \
    xorg-dev libxcb-xfixes0-dev libxcb-shape0-dev libdbus-1-dev \
    libasound2-dev libegl-dev libgles-dev librust-wayland-egl-dev

Run demo

Native:

cd examples/gallery
cargo run

Wasm:

Make sure that Emscripten SDK is installed.

cd examples/gallery
cargo build --target wasm32-unknown-emscripten --release
python3 -m http.server

Visit http://localhost:8000/web/ to preview.

License

MIT

Extension points exported contracts — how you extend this code

PropValueParse (Interface)
TODO rename [18 implementers]
src/style.rs
IApp (Interface)
Deft app trait [6 implementers]
src/app.rs
ElementBackend (Interface)
(no doc) [16 implementers]
src/element.rs
FromJsValue (Interface)
(no doc) [12 implementers]
src/js/js_binding.rs
AnimationActor (Interface)
(no doc) [3 implementers]
src/animation/actor.rs
RenderBackend (Interface)
(no doc) [3 implementers]
skia-window/src/surface.rs
FrameController (Interface)
(no doc) [2 implementers]
src/animation.rs
DeNan (Interface)
(no doc) [1 implementers]
src/number.rs

Core symbols most depended-on inside this repo

clone
called by 342
src/mrc.rs
insert
called by 72
src/id_hash_map.rs
get
called by 50
src/cache.rs
as_weak
called by 45
src/mrc.rs
as_ref
called by 42
src/font.rs
bindEvent
called by 41
lib.js
addChild
called by 37
lib.js
add_global_functions
called by 34
src/js/js_engine.rs

Shape

Method 1,594
Class 490
Function 275
Interface 72
Enum 45

Languages

Rust81%
TypeScript19%

Modules by API surface

lib.js305 symbols
src/element.rs137 symbols
src/window.rs110 symbols
js/deft.d.ts104 symbols
src/base.rs85 symbols
src/text/textbox.rs74 symbols
src/paint.rs62 symbols
src/element/common/editable.rs55 symbols
src/style/select.rs45 symbols
src/event.rs40 symbols
src/js/js_serde.rs36 symbols
src/js/js_deserialze.rs35 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add deft \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact