跳到正文

正在自动登录…

← 返回项目列表

oscar-soirey/Raven

GUI界面构建

Raven 是一个轻量级、多线程的 C 语言 GUI 库,专为编辑器和工具软件设计。它提供类似 Slate 的布局系统,支持 XML 定义界面,并通过官方 IDE、多语言绑定等功能,帮助开发者高效构建跨平台桌面应用。适合需要高性能、现代界面效果的开发者。

AI 中文解读 · 根据仓库描述与 README 生成 · 2026/10/29 10:16:18 · 查看原文

值得看C库与框架
累计 Stars
1,049
当前热度
7~30 天 · 小火
仓库创建时间
打开 GitHub ↗项目网站 ↗

选用指南

AI 根据 README 整理 · 2026/10/29 10:16:18

适用场景

适用于开发需要复杂界面和动画效果的编辑器或工具软件,如图形编辑器、IDE、3D场景编辑器等。

查看 README 依据
# Raven A lightweight, multithreaded GUI library in C for editors and tools. ## Disclaimer : This project is still in active development and public API is subject to change. ## Build from source Raven builds with CMake and a C11 compiler, and has no dependency to install besides the X11 development package on Linux. The Vulkan *headers* are downloaded automatically during the configuration (git and an internet connection are needed for that), unless the [Vulkan SDK](https://vulkan.lunarg.com) is installed. No Vulkan library is linked.
The build trees are in `build\dist\`. `./dist.sh` makes the Linux packages. `cmake --build build --target package` makes a simpler archive (one library) with CPack. ## Examples ![The Raven Bevy Editor](docs/images/bevy_editor_viewport.png) *`examples/bevy_editor`: the viewport of the scene editor written in `.xmlrs`, with the move gizmo on the selected cube (here drawn by its software renderer).* | | | |---|---| | `examples/hello` | a window with the C API |
目标用户

面向希望用 C 语言构建高性能 GUI 应用的开发者,支持多种语言绑定,如 Rust、Python 等。

查看 README 依据
`.xmllua`. `ravenc` compiles the XML into your language, so everything is checked by your compiler and built by your usual tools (CMake, Cargo, `go generate`, MSBuild, `zig build`, a Python or Lua import). See [XMLC](#one-file-any-language-xmlc). - **The official IDE** (`raven_designer`): new projects in all eight languages, interfaces edited visually next to their code, completion of the Raven API, translations in a table, build, run and compiler errors at their line in the `.xml…` file. See [The IDE](#the-ide).
| `.xmlpy` | Python | `import raven_xmlpy`, then `import main` or `python -m raven_xmlpy main.xmlpy` | `def f(sender, action)` | `ui.x` | | `.xmlgo` | Go | `//go:generate ravenc main.xmlgo -o main.xmlgo.go` | `func f(raven.ID, string)` | `ui.x` | | `.xmlcs` | C# | MSBuild: `bindings/csharp/Raven.XmlCs.targets` | `static void F(uint, string)` | `MainUi.x` | | `.xmlzig` | Zig | `build.zig`: `xmlzig.compile` (`bindings/zig/xmlzig.zig`) | `fn f(Rid, ?[*:0]const u8, ?*anyopaque) callconv(.C) void` | `ui.x` |
使用方式

通过 CMake 集成到项目中,使用 C API 或 XML 定义界面,并可选用官方 IDE raven_designer 进行可视化编辑。

查看 README 依据
find_package(raven REQUIRED) # configure with -DCMAKE_PREFIX_PATH=<path to install> target_link_libraries(app PRIVATE raven::raven) ``` or, without installing, `add_subdirectory(Raven)` before the same `target_link_libraries`. Prebuilt packages for every platform are attached to the [releases](https://github.com/oscar-soirey/Raven/releases). - **The interface and its code in one file, in your language.** Write the window in XML and its code in `<script>` beside it: `.xmlc` (C), `.xmlc++`, `.xmlrs` (Rust), `.xmlpy`, `.xmlgo`, `.xmlcs` (C#), `.xmlzig`,
Rslot_set_halign(box, R_HALIGN_CENTER); Rslot_set_valign(box, R_VALIGN_CENTER); Rwindow_set_content(window, box); Rwidget_add_child(box, Rlabel_create("Hello from Raven")); Rid button = Rwidget_add_child(box, Rbutton_create("Quit")); Rbutton_set_clicked_callback(button, on_clicked, NULL); while (Rwait_frame(-1.0)) {} /* the loop is yours: see "The loop" */ Rshutdown(); return 0; } ``` The same window in XML (`Rwindow_create_from_xml_file("hello.xml")`): ```xml <Window Title="Hello" Width="420" Height="220">
the language's own tools (`CMakeLists.txt`, `Cargo.toml` and `build.rs`, `go.mod`, `.csproj`, `build.zig`) and `strings.csv`. The **Explorer** shows the files; a double click opens each one where it belongs. **Interfaces, visually, next to their code.** A `.xml`, or the interface of a `.xml…`, opens in the visual editor, the same document shown five ways and kept in step: - **Widgets**: what can be added, the tags of the library and those the document declares with `<Widget>`. A double click adds inside the selection.
部署要求

需要支持 C11、CMake 3.16+ 的编译环境,Linux 需安装 X11 开发包,Windows 需要 Visual Studio 或 MinGW-w64,macOS 需要 Xcode 命令行工具和 CMake。构建时需获取 Vulkan 头文件(如无 Vulkan SDK 则自动下载)。

查看 README 依据
Each build below gives the library, `ravenc` (the XMLC compiler), the designer, the examples and the tests. Add `-DRAVEN_BUILD_SHARED=ON` to the configure command for a shared library (`raven.dll`, `libraven.so`, `libraven.dylib`) instead of a static one. ### Windows (Visual Studio) 1. Install [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/) (Community is fine) with the **Desktop development with C++** workload; it includes CMake. Install [Git](https://git-scm.com/download/win). 2. Open the **Developer PowerShell for VS 2022** and run: ```powershell
ctest --test-dir build --output-on-failure # optional: the tests cmake --install build --prefix install # or: sudo cmake --install build ``` The programs are in `build/bin` (`./build/bin/raven_editor`, `./build/bin/raven_designer`). At run time the Vulkan driver of the system is used (`libvulkan.so.1`, from the `libvulkan1` / `vulkan-loader` package). ### macOS 1. Install the Xcode command line tools (`xcode-select --install`) and CMake (`brew install cmake`, or the app from [cmake.org](https://cmake.org/download/)). 2. Build: ```sh
real GPUs, Windows, macOS and Linux (X11), the screen readers of each system, `raven_web`, the designer, the build scripts, `dist.sh`/`dist.bat`, the CMake package and every binding (C++, Python, Rust, Go, C#, Zig, LuaJIT). ## Build options and scripts Requirements: CMake 3.16+, a C11 compiler. Linux also needs the X11 development package (`libx11-dev`). The Vulkan *headers* are needed to build; they come from the Vulkan SDK when it is installed and are downloaded otherwise. No Vulkan library is linked. ```sh cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
已知限制

项目仍在积极开发中,公开 API 可能变更,版本 0.1 已通过多项测试,但需注意性能优化。

查看 README 依据
# Raven A lightweight, multithreaded GUI library in C for editors and tools. ## Disclaimer : This project is still in active development and public API is subject to change. ## Build from source Raven builds with CMake and a C11 compiler, and has no dependency to install besides the X11 development package on Linux. The Vulkan *headers* are downloaded automatically during the configuration (git and an internet connection are needed for that), unless the [Vulkan SDK](https://vulkan.lunarg.com) is installed. No Vulkan library is linked.
or a modified copy of it, keep its license and copyright notices and say what you changed. Contributions (issues, pull requests) are welcome on [GitHub](https://github.com/oscar-soirey/Raven). Questions: oscarsoirey.contact@gmail.com. ## Status Version 0.1. Everything in this README has been tested: the headless test programs (layout, widgets, XML, threads, memory, animations, text editor, shell, dialogs, themes, Markdown, tools, locales and accessibility, clean under AddressSanitizer, UBSan and ThreadSanitizer), the renderer and glass on

README

正在加载 README…

收录信息

仓库创建时间
2026/10/9 13:45:57
首次达标收录
2026/10/29 10:11:30
统计更新时间
2026/10/29 19:41:06

按创建时长与累计 Stars 判断等级。首次达标收录后,即使未达当前门槛仍保留;累计 Stars 和仓库状态会定期更新。确认只有 README 及辅助文件的仓库会停止公开。

模型评估

值得看加权总分 4.0 / 5

新颖度
4.0
实用价值
4.2
成熟度
4.4
实质含量
3.6

由 Jev 模型根据仓库描述与 README 评估,2026/10/29 10:11:30 生成。评分仅供参考,不是代码、安全或许可证审查;热度等级另按创建时长与累计 Stars 计算。

仓库信息

最近推送
2026/10/29 03:01:40
许可证标识
Apache-2.0
Fork 数
38
当前状态
未归档

收录记录

按创建时长与累计 Stars 首次收录:小火
首次发现项目