Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Woocraft
Woocraft is a Rust component library built on top of GPUI.
This repository is organized as a Cargo workspace, with the main maintained crate at crates/woocraft.
[!WARNING]
this crate is in early work-in-progress state.
most of components come from longbridge/gpui-component and components in zed editor, with some visual fixes / improvements.
it may lacks of feature.
Features
- Composable UI components powered by GPUI
- Built-in theme system (Light / Dark)
- Optional embedded icon and font assets
- Built-in internationalization (i18n)
- Multiple runnable examples
Component Overview
woocraft currently exports the following components/modules:
- Core primitives: Theme, Icon, style extensions, IndexPath, Anchor
- Common widgets: Button, Input, Checkbox, Switch, Slider, Spinner, Tag
- Navigation/info: Breadcrumb, Pagination, Tooltip, Popover, Notification
- Layout/structure: Divider, TitleBar, WindowBorder, WidgetGroup
- Advanced widgets: List, VirtualList, Menu, Progress
For exact exports, see
crates/woocraft/src/widgets/mod.rsandcrates/woocraft/src/base/mod.rs.
Requirements
- Rust
1.93.0or newer
Installation
on crates.io:
[]
= "0.1"
To use directly from this repository:
[]
= { = "https://github.com/Reverier-Xu/woocraft", = "woocraft" }
Quick Start
use ;
woocraft::init(cx) will:
- Initialize i18n
- Register global actions
- Initialize base theme/style state
- Initialize component-level features (such as input/list/menu)
Run Examples
Run from the repository root:
Example sources are located in crates/woocraft/examples/.
Internationalization (i18n)
Built-in locales:
zh-hanszh-hanten-usja-jp
By default, locale is detected from LC_ALL / LANG and normalized to one of the supported values above.
You can also switch locale at runtime:
set_locale;
let current = locale;
Load custom locale data and extend existing translations at runtime:
use HashMap;
let mut custom = new;
custom.insert;
load_locale;
extend_locale;
Translation interfaces from rust-i18n are re-exported (for example woocraft::translate()).
Feature Flags
resources(enabled by default):- Enables
rust-embed - Exposes
woocraft::Assets - Automatically registers embedded fonts (inside
woocraft::init)
- Enables
Disable default features:
[]
= { = "0.1.0", = false }
Repository Layout
.
├─ crates/
│ └─ woocraft/ # Main crate
├─ packages/
│ └─ woocraft/ # npm package metadata (version alignment)
└─ deprecated/ # Legacy/migrating code
├─ ui/
├─ story/
├─ assets/
├─ webview/
├─ reqwest_client/
└─ macros/
Development
License
Copyright 2026 Reverier-Xu.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.