百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

dip

> 数据库
开源

Rust 应用程序框架重点关注可组合性,ECS 和 Web3。由 Bevy 游戏引擎、Tauri 和 Dioxus 提供支持。从桌面应用程序到元宇宙。

365 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

Rust 应用程序框架重点关注可组合性,ECS 和 Web3。由 Bevy 游戏引擎、Tauri 和 Dioxus 提供支持。从桌面应用程序到元宇宙。

use dip::prelude::*;

fn main() {
    App::new()
        .insert_resource(WindowDescriptor {
            title: "dip Plugin Example".to_string(),
            ..Default::default()
        })
        .add_plugin(DesktopPlugin::::new(Root))
        .run();
}

fn Root(cx: Scope) -> Element {
    cx.render(rsx! {
        h1 { "Hello, World !" }
    })
}
  • All features are implemented as Bevy plugins
  • Data-driven ECS design pattern
  • Share your logic between games, desktop apps and command line tools
  • Webview based UI powered by Tauri
  • React-like declarative UI via Dioxus
  • Developer tools
    • Bundle: Tools to setup your computer with one command
      • Homebrew: Installs Homebrew formula, cask, mas via brew bundle
      • Symlink manager aka Dotfiles: inspired by GNU Stow.
      • Version Manager: like asdf, nvm, rbenv, gvm etc.
    • Device: interact with hardware crypto wallet.

WARNING: dip is still in the very early stages of development.

v0.1 is totally a different application. I wanted to make a cross-platform text editor but ended up making this framework.

Features

Desktop App

Minimum setup with component state

Code example

toml
# Cargo.toml

[dependencies]
dip = { version = "0.2", features = ["desktop"] }
use dip::prelude::*;

fn main() {
    App::new()
        .insert_resource(WindowDescriptor {
            title: "Desktop App".to_string(),
            ..Default::default()
        })
        .add_plugin(DesktopPlugin::::new(Root))
        .run();
}

fn Root(cx: Scope) -> Element {
    let name = use_state(&cx, || "world".to_string());

    cx.render(rsx! {
        h1 { "Hello, {name} !" }

        input {
            value: "{name}",
            oninput: |e| {
                name.set(e.value.to_string());
            },
        }
    })
}

Keyboard handling

  • Keyboard event
  • Key bindings

CLI App

CliPlugin

Code example

toml
# Cargo.toml

[dependencies]
dip = { version = "0.2", features = ["cli"] }
clap = { version = "3.2", features = ["derive"] }
…
bash
cargo run -- --help

dip-cli-example 0.1.0
Junichi Sugiura
Example binary project to showcase CliPlugin usage.

USAGE:
    cli [OPTIONS] [ROOT_ARG] 

ARGS:
    

OPTIONS:
    -h, --help           Print help information
    -p, --path 
    -V, --version        Print version information

SUBCOMMANDS:
    hello
    hello2
    help     Print this message or the help of the given subcommand(s)
    ping

State management (Inspired by Redux)

UiStatePlugin, UiActionPlugin

Code example

toml
# Cargo.toml

[dependencies]
dip = { version = "0.2", features = ["desktop"] }

# Removing this crate throws error.
# This is because some derive macros generates code using sub crate name instead of root
# (e.x. bevy_ecs::Component vs bevy::ecs::Compoent)
bevy_ecs = "0.8"
…

About Bevy and Dioxus

Bevy

https://github.com/bevyengine/bevy

  • Data-driven game engine based on Entity Component System(ECS) design pattern
  • Flexible Plugin design
  • Plugin ecosystem

Bevy is a cutting-edge game engine in Rust based on Entity Component System(ECS) design pattern. Think of it as a global state management tool like Redux but much more performant because all systems will run as parallel as possible. Thanks to its plugin system, there's already a handful of third-party Bevy plugins out there. Imagine implementing core logic as CorePlugin separated from UI layer. You may start with dip::desktop to build desktop application. Then let's say you want to release a metaverse edition at some point in the future, it's as simple as swapping UI plugin to Bevy's 3d rendering plugin while still using the same CorePlugin.

Tauri

  • TAO
  • WRY

Tao is a window manager and the fork of winit. DesktopPlugin depends on this library to render webview. And the webview is powered by WRY which is essentailly a Rust wrapper around OS specific webview.

Why not Tauri?

If you want to write frontend in any languages other than Rust, then Tauri is a better fit! If you want to go full Rust, then that's where dip shines.

Dioxus

https://github.com/DioxusLabs/dioxus

  • Cross-platform (macOS, Linux, Windows, TUI, etc.)
  • React-like declarative UI library
  • Virtual dom is 3x faster than React
  • Minimum bundle size is around 20x lighter than Electron (8 MB vs 160MB)

Dioxus is a cross-platform declarative UI library. It provides familiar features that React developer expects such as component, state, props, hooks, global state, and router. If you familiar with any modern state driven UI framework, you should be able to read or write Dioxus components without knowing Rust.

Examples

Make sure to install all prerequisites for Tauri.

  • Prerequisites

Clone repository

bash
gh repo clone diptools/dip
cd dip

Counter example

bash
cargo run --example counter --features desktop

Find more in examples/ directory.

TodoMVC example

  1. Install dip CLI.
bash
cargo install dip

# or install local binary
cargo install --path .
  1. Compile Tailwind CSS
bash
dip build -p examples/todomvc
  1. Run
bash
cargo run -p todomvc

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustbevy-enginebevy-plugincross-platformdeclarative-ui

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库