419f8f115e
* Treat doc warnings as errors. Historically we've not done so due to
various `rustdoc` bugs giving false positives but I got it to pass
without failure right now, so perhaps better times have arrived.
* Target only `x86_64-unknown-linux-gnu` on docs.rs as we don't have any
platform specific docs.
* Properly enable example scraping for `xilem`, `xilem_core`, and
`masonry`. Fully disable it for `xilem_web` which does not have examples
as Cargo defines them.
* Pass `--all-features` at docs.rs to match our CI and reduce the
maintenance burden of manually syncing the features list.
* Enable the `doc_auto_cfg` feature for docs.rs which will show a little
tip next to feature gated functionality informing of the crate feature
flag.
* Replaced `[!TIP]` with `💡 Tip` that was inside `<div
class="rustdoc-hidden" />`. The GitHub specific tip causes a `rustdoc`
error and [didn't even render
properly](
|
||
---|---|---|
.. | ||
examples | ||
src | ||
tests | ||
.gitignore | ||
Cargo.toml | ||
LICENSE | ||
README.md |
README.md
Xilem Core
Xilem Core provides primitives which are used by Xilem (a cross-platform GUI toolkit) and Xilem Web (a web frontend framework). 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. Though, while Xilem Core should be able to support all kinds of domains, the crate prioritizes the ergonomics for users of Xilem.
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 use alloc
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.
Minimum supported Rust Version (MSRV)
This version of Xilem Core has been verified to compile with Rust 1.79 and later.
Future versions of Xilem Core might increase the Rust version requirement. It will not be treated as a breaking change and as such can even happen with small patch releases.
Click here if compiling fails.
As time has passed, some of Xilem Core's dependencies could have released versions with a higher Rust requirement. If you encounter a compilation issue due to a dependency and don't want to upgrade your Rust toolchain, then you could downgrade the dependency.
# Use the problematic dependency's name and version
cargo update -p package_name --precise 0.1.1
Community
Discussion of Xilem Core development happens in the Linebender Zulip, specifically the #xilem channel. All public content can be read without logging in.
Contributions are welcome by pull request. The Rust code of conduct applies.
License
- Licensed under the Apache License, Version 2.0 (LICENSE or http://www.apache.org/licenses/LICENSE-2.0)