Xilem Web
Experimental implementation of the Xilem architecture for the Web
This is a prototype implementation of the Xilem architecture (through Xilem Core) using DOM elements as Xilem elements (unfortunately the two concepts have the same name).
Quickstart
The easiest way to start, is to use Trunk within some of the examples (see the web_examples/ directory).
Run trunk serve, then navigate the browser to the link provided (usually http://localhost:8080).
Example
A minimal example to run an application with xilem_web:
use ;
+ use<>
Precise Capturing
Throughout Xilem you will find usage of + use<> in return types, which is the Rust syntax for Precise Capturing.
This is new syntax in the 2024 edition, and so it might be unfamiliar.
For example, take this line in the example above:
+ use<>
The precise capturing syntax in this case indicates that the returned view does not make use of the lifetime of clicks.
This is required because the view types in Xilem must be 'static, but as of the 2024 edition, when impl Trait is used
for return types, Rust assumes that the return value will use the parameter's lifetimes.
That is a simplifying assumption for most Rust code, but this is mismatched with how Xilem works.
Minimum supported Rust Version (MSRV)
This version of Xilem Web has been verified to compile with Rust 1.96 and later.
Future versions of Xilem Web 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.
Community
Discussion of Xilem Web 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)