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

anathema

> 编程语言
开源

Rust 中的 TUI 库,具有自定义的模板语言和运行时

354 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Rust 中的 TUI 库,具有自定义的模板语言和运行时

Anathema

The Guide

Anathema is a library for building text user interfaces using composable components, with a custom markup language.

It was created with the intent to give developers a fast and easy way to build text user interfaces (TUIs) and ship the template(s) alongside the application, giving the end user the option to customise the application to their liking.

By separating the layout from the rest of the application, reducing the amount of code needed to express your design, and featuring hot reloading it becomes incredibly fast to iterate over the design.

Anathema has a single pass layout inspired by Flutter and Swift UI.

Supported features

  • Hot reloading
  • Reactive templates
  • Template functions
  • Third party components
  • Distributable templates
  • Message passing supports async
  • Message passing between components via an emitter

Note Anathema should be considered beta for now.

See The Guide for getting started.

Example component

rust
struct MyComponent;

impl Component for MyComponent {
    type State = MyState;
    type Message = ();

    fn on_tick(
        &mut self,
        state: &mut Self::State,
        children: Children,
        context: Context,
        dt: Duration,
    ) {
        *state.value.to_mut() += 1;
    }
}

#[derive(State)]
struct MyState {
    counter: Value,
}

Example template

vstack
    text "the counter is " state.counter
    text "the counter will be " state.counter + 1
    if state.count > 10
        text "the counter is more than ten"

output

the counter is 11
the counter will be 12
the counter is more than ten

Screenshots etc.

Bubbles by Jyn ASCII

cinema

Markdown reader by Doddi

Screenshot by Jyn

Twitch UI by Twitch user s9tpepper_

Issues· 0 开放

查看全部 Issues在 GitHub 打开

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

> 标签

Rust

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

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

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