Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

frui

> 编程语言
Open source

A developer-friendly framework for building user interfaces in Rust

1.1K stars0 likes0 views
WebsiteGitHub

About

A developer-friendly framework for building user interfaces in Rust

Reading: "Fru–" as in "fruit" and "–i" as in "I am". *

What is Frui?

Frui is a developer-friendly UI framework that makes building user interfaces easy and productive. It's inspired by Flutter architecture and is written in Rust!

For an introduction see the announcement.

Example

rust
#![feature(type_alias_impl_trait)]

use frui::prelude::*;

#[derive(ViewWidget)]
struct App(&'a str);

impl ViewWidget for App {
    fn build(&'w self, _: BuildCx) -> Self::Widget {
        Center::child(Text::new(format!("Hello, {}!", self.0)))
    }
}

fn main() {
    run_app(App("World"));
}

Warning

Frui is an experimental framework and is not suitable for building real applications. It is more of a proof of concept and an exploration of new ideas, rather than a fully-fledged and reliable tool. While it may have some interesting implications and possibilities, it is not yet ready for production use and the development efforts on it are rather sporadic. It is currently not optimized and some important features have not been implemented.

To compile it you will need to install the latest version of nightly Rust.

Feel free to try it out!

Features

Ok, what's in there?

  • Basic widgets:
    • ViewWidget
    • InheritedWidget
    • RenderWidget
  • Impls:
    • WidgetState
    • RenderState
    • ParentData
  • Preserving state:
    • LocalKey
    • Position in children list
  • Basic event detectors:
    • KeyboardEventDetector
    • PointerListener
    • PointerRegion
  • Basic widgets:
    • Text
    • Center
    • Row
    • Column
    • Flex
    • Stack
    • SizedBox
    • LimitedBox
    • ConstrainedBox

For more features see examples.

Counter - Example

Obligatory crab counter! From examples/crab_counter.rs.

…

Crab counter running on MacOS *

Credits

Frui was inspired by Flutter's widget architecture and API, and builds upon the work done in Druid, which powers much of the back-end and has influenced the implementation of many widgets. The contributions of both Flutter and Druid were essential to the development of Frui, and for those – thank you!

License

All code in this repository is dual-licensed under either:

  • MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
  • Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rust

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言