xilem/xilem_core/README.md

3.5 KiB

Xilem Core

Reactivity primitives for Rust

Latest published version. Documentation build status. Apache 2.0 license.

Linebender Zulip chat. GitHub Actions CI status. Dependency staleness status.

Xilem Core provides primitives which are used by Xilem (a cross-platform GUI toolkit). If you are using Xilem, its documentation will probably be more helpful for you.

Xilem apps will interact with some of the functions from this crate, in particular memoize. Xilem apps which use custom widgets (and therefore must implement custom views), will implement the View trait.

If you wish to implement the Xilem pattern in a different domain (such as for a terminal user interface), this crate can be used to do so.

Hot reloading

Xilem Core does not currently include infrastructure to enable hot reloading, but this is planned. The current proposal would split the application into two processes:

  • The app process, which contains the app state and create the views, which would be extremely lightweight and can be recompiled and restarted quickly.
  • The display process, which contains the widgets and would be long-lived, updating to match the new state of the view tree provided by the app process.

Quickstart

no_std support

Xilem Core supports running with #![no_std], but does require an allocator to be available.

It is plausible that this reactivity pattern could be used without allocation being required, but that is not provided by this package. If you wish to use Xilem Core in environments where an allocator is not available, feel free to bring this up on Zulip.

Community

Discussion of Xilem Core development happens in the Linebender Zulip, specifically in #xilem. All public content can be read without logging in.

Contributions are welcome by pull request. The Rust code of conduct applies.

License