<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by clia on Medium]]></title>
        <description><![CDATA[Stories by clia on Medium]]></description>
        <link>https://medium.com/@clia_68451?source=rss-56de66810f10------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*al1ByT0o6UuqKyws</url>
            <title>Stories by clia on Medium</title>
            <link>https://medium.com/@clia_68451?source=rss-56de66810f10------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 03:36:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@clia_68451/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Snow UI’s First Release: Write Your UI Once in Rust, Run It on Desktop, Mobile, and Web]]></title>
            <link>https://medium.com/@clia_68451/snow-uis-first-release-write-your-ui-once-in-rust-run-it-on-desktop-mobile-and-web-e9c02d2e685c?source=rss-56de66810f10------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9c02d2e685c</guid>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[declarative-ui]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[cross-platform]]></category>
            <dc:creator><![CDATA[clia]]></dc:creator>
            <pubDate>Wed, 30 Sep 2026 06:53:33 GMT</pubDate>
            <atom:updated>2026-09-30T06:53:33.817Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YpK1JEynnwNOnHCRyBBrtw.png" /></figure><p>A new pure-Rust UI framework just showed up: <strong>Snow UI</strong>. Its 0.0.1 is now on crates.io, and the author’s own status line says it all:</p><blockquote><em>“It works, initially.”</em></blockquote><p>Translation: <strong>it runs, but don’t treat it like a stable framework yet.</strong></p><p>Still, the design ideas are interesting enough that it’s worth paying attention.</p><h3>What exactly is Snow UI?</h3><p>Snow UI is a <strong>pure Rust UI framework</strong>:</p><ul><li>No JavaScript</li><li>No C++ glue layer</li><li>No VM</li><li>No hidden frontend runtime</li><li>Compiles to native code, and to WASM for the web</li></ul><p>Its pitch is ambitious: one Rust codebase for six platforms.</p><p>🪟 Windows 🍎 macOS 🐧 Linux 🤖 Android 📱 iOS 🌐 Web/WASM</p><p>The slogan is simple: <strong>one codebase, every platform.</strong></p><h3>The core idea: the UI is a projection of a virtual world</h3><p>Most UI frameworks say something like “UI is a function of state.”</p><p>Snow UI says something stranger, but more coherent:</p><blockquote><em>The UI is a projection of a virtual world onto the screen.</em></blockquote><p>Your app is not a tree of pages. It is a <strong>World</strong>:</p><ul><li>World: the whole virtual world</li><li>Object: an object inside that world</li><li>Element: an object with properties, behaviors, and the ability to communicate through messages</li><li>Rendering: projecting that world onto the screen</li></ul><p>The framework’s first example is not a button or a form. It’s a “lovely girl”:</p><pre>use snow_ui::prelude::*;<br><br>#[element]<br>struct LovelyGirl {<br>    girl: Girl,<br>}<br><br>impl LovelyGirl {<br>    pub fn obj() -&gt; Object {<br>        obj!(LovelyGirl {<br>            girl: Girl {<br>                hair_color: HairColor::Black,<br>                skin_color: SkinColor::Yellow,<br>                body_type: BodyType::Slim,<br>                appearance: Appearance::Beautiful,<br>                every_morning: actions![<br>                    GirlActions::SayHi,<br>                    GirlActions::PrepareBreakfast,<br>                ],<br>            }<br>        })<br>    }<br>}</pre><pre>pub fn world() -&gt; World {<br>    World {<br>        root: LovelyGirl::obj(),<br>        ..default()<br>    }<br>}</pre><p>That tells you a lot. Snow UI wants to establish the <strong>object + behavior</strong>​ model before it talks about widgets.</p><h3>Seven concepts you actually need</h3><p>You don’t need to memorize the docs. Remember these:</p><p>Concept</p><p>What it does</p><p>World</p><p>Root of the UI: the virtual world</p><p>Object</p><p>A UI element / custom component instance</p><p>#[element]</p><p>Declares “this is a UI object”</p><p>#[message]</p><p>Type-safe message / intent</p><p>State&lt;T&gt;</p><p>Reactive state; when it changes, the UI updates</p><p>event_bus()</p><p>Global event bus for decoupled communication</p><p>async handle</p><p>Built on Tokio: clicks, timers, and network calls are async</p><h3>The UI is not JSX. It’s an object tree.</h3><p>Snow UI describes interfaces with Rust macros:</p><ul><li>obj! creates an object</li><li>list! holds child objects</li><li>actions! attaches behavior to an object</li></ul><p>A clock example looks like this:</p><pre>pub fn world() -&gt; World {<br>    World {<br>        root: obj!(Board {<br>            width: VIEWPORT_WIDTH,<br>            height: VIEWPORT_HEIGHT,<br>            h_align: HAlign::Center,<br>            v_align: VAlign::Middle,<br>            children: list![<br>                Card {<br>                    children: list![<br>                        Row { children: list![ Text { text: &quot;Clock Example ⏰&quot; } ] },<br>                        Row { children: list![ TextClock { format: &quot;%H:%M:%S&quot; } ] },<br>                    ]<br>                }<br>            ]<br>        }),<br>        ..default()<br>    }<br>}</pre><p>No HTML. No JSX. No return view().</p><p>It feels more like building an object tree with Rust struct syntax. Because the code is just Rust, you get IDE features like syntax highlighting, go-to-definition, and refactoring — something many Rust UI frameworks still struggle with.</p><h3>State + messages: the part Snow UI really cares about</h3><p>Snow UI has something tempting and dangerous: an <strong>event bus</strong>.</p><p>The author has written openly about this tradeoff. Typed messages feel great:</p><ul><li>You send a concrete struct</li><li>The compiler checks the types</li><li>You can follow message types to find dependencies</li><li>You don’t argue about “where does this state live”</li></ul><p>But once you have dozens of messages, problems appear:</p><ul><li>Message handling order becomes implicit</li><li>State logic spreads across handlers</li><li>Refactoring gets painful</li><li>Chains of messages hide the real data flow</li></ul><p>So Snow UI’s recommended pattern is stricter:</p><ol><li>Components hold State</li><li>A user action sends an <strong>intent message</strong></li><li>A handler receives the message and updates State</li><li>UI bound to that State re-renders automatically</li></ol><p>The button-counter example is the canonical version:</p><pre>#[message]<br>struct IncreaseButtonClicked {}</pre><pre>#[element]<br>struct IncreaseButton {<br>    button: Button,<br>}</pre><pre>impl ClickHandler for IncreaseButton {<br>    async fn on_click(&amp;mut self) {<br>        event_bus().send(IncreaseButtonClicked {});<br>    }<br>}</pre><pre>#[element]<br>struct SimpleText {<br>    count: State&lt;i32&gt;,<br>    text: Text,<br>}</pre><pre>register_handler!(<br>    impl MessageHandler for SimpleText {<br>        async fn handle(&amp;mut self, _: &amp;IncreaseButtonClicked, _: &amp;mut MessageContext) {<br>            self.count.update(|c| *c += 1);<br>        }<br>    }<br>);</pre><p>The rule worth remembering:</p><blockquote><em>Messages are intent. State is the single source of truth.</em></blockquote><blockquote><em>Don’t send more messages inside handlers. Don’t build message chains.</em></blockquote><p>That discipline matters more than “does it draw a button.”</p><h3>Async is a first-class citizen</h3><p>Snow UI is built directly on <strong>Tokio</strong>:</p><ul><li>on_click is async</li><li>message handlers are async</li><li>IntervalTimer sends messages on a schedule</li><li>ServerApi can call HTTP endpoints</li><li>Form + ServerApi can express login flows</li></ul><p>A minimal timer looks like this:</p><pre>#[message]<br>#[derive(Default)]<br>struct SimpleTextTimerTickEvent {}</pre><pre>#[element]<br>struct SimpleTextTimer {<br>    seconds: State&lt;i32&gt;,<br>    timer: IntervalTimer,<br>    text: Text,<br>}</pre><pre>register_handler!(<br>    impl MessageHandler for SimpleTextTimer {<br>        async fn handle(&amp;mut self, _: &amp;SimpleTextTimerTickEvent, _: &amp;mut MessageContext) {<br>            self.seconds.update(|s| *s += 1);<br>        }<br>    }<br>);</pre><p>Clocks, polling, animations, network refresh — none of this requires hand-rolled thread pools or manual channels.</p><h3>What widgets already exist?</h3><p>In 0.0.1, the primitive set already includes:</p><p><strong>Layout</strong></p><ul><li>Board</li><li>Card</li><li>Row</li></ul><p><strong>Basic controls</strong></p><ul><li>Text</li><li>Button</li><li>TextInput</li><li>Switch</li></ul><p><strong>Higher-level capabilities</strong></p><ul><li>Form</li><li>TextClock</li><li>IntervalTimer</li><li>ServerApi</li></ul><p>So this isn’t just a “label and button” toy. It’s already moving toward an application framework.</p><h3>Desktop runs. Web is still catching up.</h3><p>The desktop entry point is clean:</p><pre>#[cfg(not(target_arch = &quot;wasm32&quot;))]<br>fn main() {<br>    snow_ui::launch(world);<br>}</pre><p>Web/WASM is supported, but the README doesn’t yet fully document the WASM bootstrap path. A sensible trial order right now:</p><ol><li>Run it on Linux / macOS / Windows desktop</li><li>Try the WASM demos</li><li>Treat Android / iOS as “watch, don’t bet on it yet”</li></ol><h3>Should you use it?</h3><p>Plain version:</p><p><strong>Good for:</strong></p><ul><li>learning Rust UI architecture</li><li>small demos and tools</li><li>studying the World + Object + Message model</li><li>comparing ideas with Iced / Egui / Leptos / Dioxus</li></ul><p><strong>Not yet good for:</strong></p><ul><li>production business systems</li><li>long-lived maintenance projects</li><li>teams that need stable APIs, docs, and ecosystem guarantees</li></ul><p>0.0.1 means exactly what it sounds like: <strong>the direction exists, the rough edges are many, don’t ship it to users.</strong></p><h3>The bigger question</h3><p>Snow UI’s most interesting contribution isn’t “yet another Rust GUI framework.” It’s that it restates old UI questions in a sharper way:</p><ul><li>Is UI really a tree of pages, or a world of objects?</li><li>Can an event bus and unidirectional data flow be reconciled?</li><li>Is Rust’s async model naturally suited to frontend work if you stop fighting it?</li><li>Should multi-platform support be designed in from day one, instead of ported in later?</li></ul><p>0.0.1 is not the finish line. It’s not even a finished starting point. But if you care about where Rust UI is going over the next decade, this is a project worth starring and checking commits on.</p><p><strong>Links</strong></p><ul><li>Website: <a href="https://snow-ui.dev/">https://snow-ui.dev</a></li><li>GitHub: <a href="https://github.com/snow-ui-rs/snow-ui">https://github.com/snow-ui-rs/snow-ui</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9c02d2e685c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RCProxy: Lightweight Redis Cluster Proxy, written in Rust]]></title>
            <link>https://medium.com/@clia_68451/rcproxy-lightweight-redis-cluster-proxy-written-in-rust-cf6ea6b59fae?source=rss-56de66810f10------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf6ea6b59fae</guid>
            <category><![CDATA[redis]]></category>
            <category><![CDATA[proxy]]></category>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[cluster]]></category>
            <category><![CDATA[rust]]></category>
            <dc:creator><![CDATA[clia]]></dc:creator>
            <pubDate>Wed, 26 Oct 2022 13:22:42 GMT</pubDate>
            <atom:updated>2022-10-26T13:22:42.418Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why develop</h3><p>At first, I used the Rust library that supports Redis cluster to directly connect to the cluster, and found that the operation involving multiple keys will report an error, because the key is not assigned to a slot.</p><p>Searching for solutions online, it is recommended that a better approach is to build a proxy layer in front of the Redis cluster, which can better solve this problem.</p><p>We have examined a variety of solutions for the cluster proxy, as follows:</p><ul><li>Redis official <strong>redis-cluster-proxy</strong>: No maintenance after 2020-April, there are many problems, when trying to use the official GUI client to enter an extra password, the service exploded. Therefore not used.</li><li>NetEase Yunxin <strong>Camellia</strong>: It has been developed in the past two years and is being actively maintained with rich functions. However, it is developed based on Java, which consumes more memory and starts at 2G. Considering that the test environment server does not have so many resources, it is not used.</li><li><strong>Overlord</strong> of the Go version from Bilibili: Bilibili is in use internally, with general maintenance and acceptable functions. When I tried it, I found that it did not support the use of passwords when connecting. After considering it, I gave it up for the security of the service.</li><li>Rust version of <strong>Aster</strong> from Bilibili (<a href="https://github.com/wayslog/aster">https://github.com/wayslog/aster</a>): personally developed at Bilibili. It is said that it is also used internally. The performance is several times higher than that of the Go version. It does not support the use of passwords when connecting, but it should be better implemented. , so I decided to customize it.</li></ul><p>Finally, <strong>Aster</strong> was customized and developed to realize the password function. The repository address: <a href="https://github.com/clia/rcproxy">https://github.com/clia/rcproxy</a></p><p>In version 2.2 of <strong>RCProxy</strong>, RedisInsight, the official client of Redis, has been fully supported.</p><h3>Installation method</h3><p>Pull the source code to the server and compile it with Rust (the memory will reach about 4G when compiling the program, and the server memory needs to be larger than 4G).</p><p>You can also download compiled binaries directly from the source code repository.</p><p>Create a configuration file from <strong>default.toml</strong> and change the configuration items in it. The configuration content of the test environment is as follows:</p><pre># Log config<br>[log]<br>level = &quot;libaster=info&quot; # &quot;trace&quot; &quot;info&quot; &quot;debug&quot; &quot;warn&quot; &quot;error&quot;<br>ansi = true  # Support ANSI Colors<br>stdout = false # Print log to stdout<br>directory = &quot;/var/log/rcproxy&quot; # Log file directory<br>file_name = &quot;rcproxy.log&quot; # Log file name</pre><pre># Metrics service config<br>[metrics]<br>port = 2110</pre><pre># Cluster config<br>[[clusters]]<br>name = &quot;test-cluster&quot;<br>listen_addr = &quot;0.0.0.0:7788&quot;<br>hash_tag = &quot;{}&quot;<br>thread = 1<br>cache_type = &quot;redis_cluster&quot;<br>servers = [&quot;172.20.151.60:7001&quot;, &quot;172.20.151.61:7001&quot;, &quot;172.20.151.62:7001&quot;, &quot;172.20.151.60:7002&quot;, &quot;172.20.151.61:7002&quot;, &quot;172.20.151.62:7002&quot;]</pre><pre>fetch_interval = 1800000 # 1800s , 30 minutes<br>fetch_since_latest_cmd = 1000 # 3600s , 1 hour<br>read_from_slave = false</pre><pre>ping_fail_limit = 10<br>ping_interval = 300</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*94Ec3BLtPG9QRvh7n10XmQ.jpeg" /></figure><pre>read_timeout = 1000<br>write_timeout = 1000<br>dial_timeout = 500<br>listen_proto = &quot;tcp&quot;<br>node_connections = 1</pre><pre>auth = &quot;mypasswd&quot; # Redis password, will ignore when empty.</pre><p>Run it directly, and you can run the server:</p><pre>./rcproxy default.toml</pre><p>If you want to install it as a <strong>systemd</strong> service on Linux, you can use the configuration file under service in the repository:</p><pre>sudo cp ./target/release/rcproxy /usr/local/bin/<br>sudo mkdir /etc/rcproxy<br>sudo cp default.toml /etc/rcproxy/<br>sudo mkdir /var/log/rcproxy<br>sudo cp service/systemd/rcproxy.service /lib/systemd/system/<br>sudo systemctl enable rcproxy<br>sudo systemctl start rcproxy</pre><p>Enjoy it. Feedbacks are welcome!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf6ea6b59fae" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>