Releases: RibirX/Ribir
ribir-v0.4.0-alpha.4
Features
-
core: Introduced
IntoWidget
andIntoChild
. (@M-Adoo #612)The
IntoWidget
trait allows for the conversion of any widget to the typeWidget
.
TheIntoChild
trait provides a way to convert a more general type into a child ofComposeChild
.
Fixed
core: The generation of a pipe widget from another pipe widget may potentially result in a crash. (#612, @M-Adoo)
Changed
-
core: Simplify the implementation of parent composition with child widgets. (#612, @M-Adoo)
Merge
SingleWithChild
,MultiWithChild
, andComposeWithChild
into a single trait called WithChild.
Breaking
- Removed
ChildFrom
andFromAnother
traits (#612 @M-Adoo) - Removed
SingleParent
andMultiParent
traits. (#612 @M-Adoo) - Removed
PairChild
andPairWithChild
traits. User can use a generic type instead. (#612 @M-Adoo) - Allow only the child to be converted to a widget or a type that implements the Into trait. (#612 @M-Adoo)
- Removed the all builder traits such as WidgetBuilder and ComposeBuilder and so on. (#612 @M-Adoo)
- All implicit child conversions have been removed, except for conversions to Widget. (#612 @M-Adoo)
ribir-v0.4.0-alpha.2
Features
- core: Added support to query a
WriteRef
from a state, enabling users to modify the state after attaching it to a widget. (#601 @M-Adoo) - core: Introduced the
DeclareInto
trait for any type that implementsDeclareFrom
. (#604 @M-Adoo)
Changed
- core: Render widgets no longer need to implement the
Query
trait. Data can only be queried if it's a state or wrapped withQueryable
. (#601 @M-Adoo)
BREAKING
ribir-v0.4.0-alpha.1
ribir-v0.3.0-beta.2
We're thrilled to announce that Ribir now supports the Web platform! πππ
Experience the power of compiling Rust code to wasm and rendering it with WebGPU or WebGL.
Check out our Wordle game demo, now running smoothly in your browser!
Features
-
macros: Added a
include_crate_svg!
macro to include the svg relative to current crate. (#552, @M-Adoo) -
ribir: Added a
nightly
feature to enable functionalities that require nightly Rust. (#552, @M-Adoo)- The
include_crates_svg!
macro can operate without thenightly
feature. - The
include_svg!
macro requires thenightly
feature to be enabled.
- The
-
ribir: Introduced
AppRunGuard
to allow app and window configuration prior to app startup. (#565, @M-Adoo)
Previously, to configure the app and window before startup,App::run
couldn't be used:unsafe { AppCtx::set_app_theme(material::purple::light()); } App::new_window(root, None).set_title("Counter"); App::exec();
Now, with AppRunGuard, you can use
App::run
and chain the configuration methods:App::run(root) .with_app_theme(material::purple::light()) .with_title("Counter");
-
core: The split functions in
StateReader::map_reader
,StateWriter::map_writer
, andStateWriter::split_writer
no longer need to return a reference. (#568 @M-Adoo) -
core: Introduced
StateWatcher
for watching state modifies, which was previously the responsibility ofStateReader
. This results in a cleaner and more compactStateReader
implementation. (#556, @M-Adoo) -
gpu: Introduced
GPUBackendImpl::max_textures_per_draw
to set a limit on textures per draw phase (#562 @M-Adoo) -
gpu: Updated the
wgpu
implementation of the GPU backend to support WebGL. (#578, @M-Adoo) -
painter: Introduced support for
Resource<Path>
for drawing. This indicates that thePath
may be shared with others, allowing the backend to cache it. (#589 @M-Adoo) -
painter: Introduced support for bundled commands, enabling the backend to process these commands as a single entity and cache the resulting output. (#589 @M-Adoo)
Fixed
-
ribir: Resolved the issue causing a black screen on the first frame. (#566, @M-Adoo)
-
gpu: Retrieve the texture limit size from the GPU instead of using a hardcoded value. (#578, @M-Adoo)
-
ribir: fixed the crash issue when the shell window is zero-sized at startup. (#582, @M-Adoo)
Changed
-
core: Enhanced panic location tracking during widget build (#559 @M-Adoo)
-
core: rename builtin field of delay_drop_until to keep_alive (#561 @wjian23)
-
macros: polish the compile error message of invalid filed in
@$var {}
(#556 @M-Adoo) -
gpu: Removed dependency on the texture array feature of wgpu. (#562, @M-Adoo)
-
algo: removed
Resource
and renameShareResource
toResource
. (#564, @M-Adoo) -
dev-helper: Support specific the comparison of image tests. (#573 @M-Adoo)
-
dev-helper: If test images differ, both actual and difference images are saved with the expected image. (#573 @M-Adoo)
-
painter: Removed the AntiAliasing feature from the
painter
package, This responsibility now lies with the painter backend. (#584 @M-Adoo) -
gpu: The GPU backend no longer relies on MSAA, which is dependent on the graphics API. Instead, it uses the alpha atlas to provide a solution similar to SSAA.(#584, @M-Adoo)
-
gpu: The GPU backend now only caches the path command if it is a
Resource
. This change reduces GPU memory usage and accelerates cache detection. (#589 @M-Adoo) -
text: Implemented caching of the glyph path as a
Resource
to improve performance. (#589 @M-Adoo)
Documented
Breaking
-
ribir: Updated
App::new_window
to acceptWindowAttributes
instead of size as the second parameter. (#565, #566, @M-Adoo) -
ribir: The window creation APIs have been updated to use asynchronous methods, improving compatibility with browsers. (#565, @M-Adoo)
-
macros: removed
map_writer!
andsplit_writer!
macros. (#568, @M-Adoo) -
ribir:
StateWriter::map_writer
andStateWriter::split_writer
now only require a writer split function, enhancing both reader and writer split operations. (#568, @M-Adoo) -
core: The
StateReader
no longer supports watching its modifications. Use theStateWatcher
trait instead for this functionality. (#556 @M-Adoo) -
painter: Changes to
BackendPainter
APIs. This only affects you if you've implemented a custom painter. (#562 @M-Adoo)
ribir-v0.2.0
Documented
-
ribir: We no longer auto-generate the built-in list document, as
FatObj
lists all. Its API documentation is sufficient. (#540 @M-Adoo) -
Ribir: Added guide "Using Ribir without 'DSL'" (#545 @M-Adoo)
Breaking
-
core: Renamed the
widget_build
method tobuild
for brevity, given its frequent usage. (#549 @M-Adoo)
_ core: renameDeclare::declare_builder
toDeclare::declarer
(#547 @M-Adoo) -
core: removed
Stateful::on_state_drop
andStateful::unsubscribe_on_drop
(#539 @M-Adoo) -
core: removed
AppCtx::add_trigger_task
andAppCtx::trigger_task
(#539 @M-Adoo) -
core: removed
FatObj::unzip
andFatObj::from_host
(#535 @M-Adoo) -
core:
FatObj::new(host: T, builtin: BuiltinObj)
->FatObj::new(host: T)
-
core: rename
DeclareBuilder::build_declare
toObjDeclarer::finish
(#547 @M-Adoo)
While these are public APIs, they are typically not required for direct use in user code.
Features
-
Support the overlay (@wjian23).
This enhancement simplifies the creation of overlay widgets. It streamlines the addition of any widget to an overlay and offers a more user-friendly API for overlay management
-
macros: Generates documentation for the builder methods of members in
#[derive(Declare)]
, thus improving IDE support.(#538 @M-Adoo) -
core: All built-in widget abilities are now exported on
FatObj
. (#535 @M-Adoo)
You can directly useFatObj
to configure built-in widget abilities such ason_click
,on_key_down
, etc.let _ = FatObj::new(Void) .margin(EdgeInsets::all(1.0)) .on_click(|_, _| { println!("click"); });
-
macros:
#[derive(Decalre)]
now generates aFatObj<State<T>>
instead ofState<T>
, and supports initialization of all built-in widgets on its ObjBuilder. (#535 @M-Adoo)
All pipes used to initialize the field will be unsubscribed when the FatObj is disposed.let row = Row::builder() .margin(...) .on_click(...) .finish(ctx);
-
macros: Introduced
simple_declare
macro for types that don't usePipe
for initialization. (#535 @M-Adoo)
Changed
-
core: StateReader now automatically unsubscribes when no writer is present (#532 @wjian23)
-
core: Consolidated all listener and
FocusNode
into aMixBuiltin
widget (#534 @M-Adoo)- The
MixBuiltin
widget reduces memory usage and allows users to utilize allon_xxx
event handlers, not only during the build declaration but also after the widget has been built.
- The
-
core: removed
MixBuiltinDeclarer
, which is no longer needed. (#538 @M-Adoo) -
macros: removed crate
ribir_builtin
that is no longer needed. (#535 @M-Adoo)
ribir-v0.3.0-alpha.5
Features
-
ribir: Introduced
AppRunGuard
to allow app and window configuration prior to app startup. (#565, @M-Adoo)
Previously, to configure the app and window before startup,App::run
couldn't be used:unsafe { AppCtx::set_app_theme(material::purple::light()); } App::new_window(root, None).set_title("Counter"); App::exec();
Now, with AppRunGuard, you can use
App::run
and chain the configuration methods:App::run(root) .with_app_theme(material::purple::light()) .with_title("Counter");
Changed
Fixed
Breaking
ribir-v0.3.0-alpha.3
ribir-v0.3.0-alpha.2
ribir-v0.1.0
πππ The first version of Ribir.
The goal of this version of Ribir is to finish the core framework and answer our questions about the feasibility of the design.
We use it to build examples and build some apps for our daily work. And we are satisfied with the experience of using it.
We are very happy to share it with you. We hope you can try it out and give us feedback. But we don't recommend you to use it in production environments yet.
Features
- core: control the process of the entire view: compose, build, update, layout and render.
- declarative language: not a new language, but a set of Rust macros that easily interact with Rust.
- widgets compose system: has four kinds of widgets to support you can implement your own widget in different ways:
- function widget and
Compose
, from other widgets composition. Render
, implement your layout and paint anything you want.ComposeChild
, control the compose logic between parent and child widgets and specify the template of child widgets.
- function widget and
- non-intrusive state: convert your data to a listenable state, and update the view according to the change of the state.
- layout system: learning and inspired by Flutter Sublinear layout, but not the same.
- event system: a composition event system, that supports event bubbling and capture. Allow to compose with any widget, and exists only if you use it.
- theme System: support full and inherit/partial theme, so you can use it to override or dynamically switch the theme of the subtree. Include palette, icons, animate transitions, the decoration widget of the widget, etc. In a very rough state and the API will be redesigned soon.
- animations: based on state but no side effect animation, it's almost stable in concept, but not many predefined animations yet.
- painterοΌ convert the view to the 2D path.
- GPU render: GPU backend for the painter, do path tessellation, so that easy to render the triangles in any GPU render engine. A
wgpu
implementation is provided as the default GPU render engine. Tessellation base on lyon. - text: support basic text typography and IME input, in a usable but rough stage.
- widgets: the widgets library provides 20+ basic widgets, but all are in a rough stage, and the API is not stable yet.
- examples: counter, storybook, messages, todos, wordle_game, etc.
Documented
- introduction: add
introduction.md
to introduce Ribir and why choose it. - get started: add the
get_started
series of tutorials to help users get started with Ribir.
ribir-v0.2.0-beta.1
Features
-
Support the overlay (@wjian23).
This enhancement simplifies the creation of overlay widgets. It streamlines the addition of any widget to an overlay and offers a more user-friendly API for overlay management
-
macros: Generates documentation for the builder methods of members in
#[derive(Declare)]
, thus improving IDE support.(#538 @M-Adoo) -
core: All built-in widget abilities are now exported on
FatObj
. (#535 @M-Adoo)
You can directly useFatObj
to configure built-in widget abilities such ason_click
,on_key_down
, etc.let _ = FatObj::new(Void) .margin(EdgeInsets::all(1.0)) .on_click(|_, _| { println!("click"); });
-
macros:
#[derive(Decalre)]
now generates aFatObj<State<T>>
instead ofState<T>
, and supports initialization of all built-in widgets on its ObjBuilder. (#535 @M-Adoo)
All pipes used to initialize the field will be unsubscribed when the FatObj is disposed.let row = Row::builder() .margin(...) .on_click(...) .finish(ctx);
-
macros: Introduced
simple_declare
macro for types that don't usePipe
for initialization. (#535 @M-Adoo)
Changed
-
core: StateReader now automatically unsubscribes when no writer is present (#532 @wjian23)
-
core: Consolidated all listener and
FocusNode
into aMixBuiltin
widget (#534 @M-Adoo)- The
MixBuiltin
widget reduces memory usage and allows users to utilize allon_xxx
event handlers, not only during the build declaration but also after the widget has been built.
- The
-
core: removed
MixBuiltinDeclarer
, which is no longer needed. (#538 @M-Adoo) -
macros: removed crate
ribir_builtin
that is no longer needed. (#535 @M-Adoo)
Documented
-
ribir: We no longer auto-generate the built-in list document, as
FatObj
lists all. Its API documentation is sufficient. (#540 @M-Adoo) -
Ribir: Added guide "Using Ribir without 'DSL'" (#545 @M-Adoo)
Breaking
While these are public APIs, they are typically not required for direct use in user code.
-
core: removed
Stateful::on_state_drop
andStateful::unsubscribe_on_drop
(#539 @M-Adoo) -
core: removed
AppCtx::add_trigger_task
andAppCtx::trigger_task
(#539 @M-Adoo) -
core: removed
FatObj::unzip
andFatObj::from_host
(#535 @M-Adoo) -
core:
FatObj::new(host: T, builtin: BuiltinObj)
->FatObj::new(host: T)
-
core: rename
DeclareBuilder::build_declare
toObjDeclarer::finish
(#547 @M-Adoo)
_ core: renameDeclare::declare_builder
toDeclare::declarer
(#547 @M-Adoo) -
core: Renamed the
widget_build
method tobuild
for brevity, given its frequent usage. (#549 @M-Adoo)