dart_eval
xilem
dart_eval | xilem | |
---|---|---|
9 | 15 | |
300 | 2,906 | |
- | 9.3% | |
8.8 | 8.9 | |
3 days ago | 5 days ago | |
Dart | Rust | |
BSD 3-clause "New" or "Revised" License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
dart_eval
-
Is it possible to create Android apps using Rust?
...which is what xml_layout and dart_eval are there for. However, at that point I wouldn't call it "writing Flutter applications in Rust" any more (which of course is just a subjective interpretation).
-
dart_eval v0.6: The Dart interpreter for Dart now with support for dart:io, permissions, Streams, try/catch, and much more
I also want to note that dart_eval now has over 100 tests running in CI! If you're interested in contributing to the project, writing even more tests might be one of the easier places to start - head on over to the GitHub repo and don't be shy to ask any questions.
-
Executing dart code at runtime
Check out dart_eval
-
Question regarding dart
I learned about this because I wrote dart_eval lol. I'm sure there is a less time-consuming way, maybe some intro to programming tutorials would teach it. But tbh I don't think it's critical to know to be a good programmer.
-
Introducing flutter_eval, one large step towards seamless Flutter code push
I've been working for a few years now on dart_eval, the pure-Dart interpreter for Dart with a focus on interop (that's also now super fast :D). While dart_eval has technically been usable in Flutter apps for a while, actually doing so was pretty painful and definitely didn't meet the ultimate goal of enabling simple, automatic code push.
-
Introducing dart_eval v0.2: the Dart interpreter for Dart now up to 350x faster with bytecode, support for multiple files, type inference, async/await, new code push features, and the world's fastest Dart compiler
Maintaining this support was of course a high priority and it's also received a full rewrite, making it both easier to use than ever and also with a significantly reduced performance cost. Of course interop performance will still be better using wrappers if you don't need to extend the class, and code push support continues to evolve with the addition of runtime overrides (see previous link).
-
Introducing dart_eval, an extensible Dart interpreter in pure Dart, enabling code push for AOT apps
If you want to understand how it works, I think a good place to start learning would be to learn about how programming languages work in general - like what is a 'declaration' vs 'expression' vs 'statement' and then maybe see if you can understand the contributing document?
xilem
- Xilem Releases v0.1.0
- Xilem – An experimental Rust architecture for reactive UI
-
Graphite: In-development raster and vector 2D graphics editor that is FOSS
The web browser gives us an extremely frictionless development and deployment process. Our CI generates a fully deploy at a unique link for every commit which lets us open and test PRs with a single click. It deploys updates to users without needing to make them go through an updater. In these relatively early stages of our development process, the importance of the velocity that gives us cannot be understated. Plus, the ability for users to try it out in one second is quite helpful.
I've designed the whole architecture specifically to avoid the web UI "feeling like a web app" with the subtle latency of interacting with the site. I wrote all-custom UI components using the minimal amount of HTML and CSS to achieve the requirements instead of depending on an external component framework which always loves nesting dozens of `div`s inside each other to achieve what should be doable in one or two. And our highly-lightweight JS which calls into Rust (Wasm) lets it keep the slow logic out of slow JS. And we are using Svelte to move most of the frontend DOM management logic from runtime to compile time. This architecture really helps us keep performance levels as close as possible to feeling native despite using the web for its GUI rendering; and I believe it has succeeded at feeling responsive by comparison to most other web apps you use (even Slack, for example, which shouldn't be nearly as complex).
Web lets us build fast, deploy the latest version to users fast, leverage prevalent developer experience with HTML/CSS for creating GUIs, and avoid getting stuck in a box with Rust's currently-immature GUI ecosystem. That's the tradeoff we had to make early on, and it was a good decision. But we will eventually move towards a fully native version...
In the short term, we plan to use [Tauri](https://tauri.app/) which is sort of a hybrid between Electron and a native application. It uses the OS's webview to shrink the shipped binary to only a few megabytes and reuse shared memory resources with other webviews at runtime. It also runs all our Rust code natively instead of through WebAssembly so all the business logic in Graphite runs natively and only the thin UI layer becomes dependent on web tech for the GUI display.
In the long term, we plan to rewrite the entire GUI in [Xilem](https://github.com/linebender/xilem) which is the up-and-coming Rust GUI that I believe will finally get everything right, including performance (which is something many desktop GUI frameworks are actually bad it, and sometimes even worse than web). We'll still deploy a web version but at that point, it will become native-first.
Hopefully that roadmap and explanation of the architectural decisions clears up any worries about the short and long term state of our GUI.
-
Is it possible to create Android apps using Rust?
That said, Xilem is very close to that idea, but it's in its very early stages and nowhere near Flutter's capabilities.
- Xilem Vector Graphics (Rust meetup talk)
-
50 Shades of Rust, or emerging Rust GUIs in a WASM world
xilem#62 demonstrates how Xilem's reactive layer can target DOM nodes.
- GUI development with Rust and GTK 4
-
Floem - yet another new Rust native UI library
Inspired by Xilem, Leptos and rui, Floem aims to be a high performance declarative UI library with minimal effort from the user.
-
XUL Layout has been removed from Firefox
There are a number of up-and-coming Rust-based frameworks in this niche:
- https://github.com/iced-rs/iced (probably the most usable today)
- https://github.com/vizia/vizia
- https://github.com/marc2332/freya
- https://github.com/linebender/xilem (currently very incomplete but exciting because it's from a team with a strong track record)
What is also exciting to me is that the Rust GUI ecosystem is in many cases building itself up with modular libraries. So while we have umpteen competing frameworks they are to a large degree all building and collaborating on the same foundations. For example, we have:
- https://github.com/rust-windowing/winit (cross-platform window creation)
- https://github.com/gfx-rs/wgpu (abstraction on top of vulkan/metal/dx12)
- https://github.com/linebender/vello (a canvas like imperative drawing API on top of wgpu)
- https://github.com/DioxusLabs/taffy (UI layout algorithms)
- https://github.com/pop-os/cosmic-text (text rendering and editing)
- https://github.com/AccessKit/accesskit (cross-platform accessibility APIs)
In many cases there a see https://blessed.rs/crates#section-graphics-subsection-gui for a more complete list of frameworks and foundational libraries)
-
What was the hardest coming from C++ to Rust?
Yeah, Druid is being replaced by Xilem, but unfortunately Xilem isn't ready yet. So that whole project's in a bit of an awkward in-between phase where there isn't really any toolkit that can be recommended.
What are some alternatives?
sdk - The Dart SDK, including the VM, dart2js, core libraries, and more.
floem - A native Rust UI library with fine-grained reactivity
hydro-sdk - Author Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.
iced - A cross-platform GUI library for Rust, inspired by Elm
flutter_eval - Code push for Flutter, powered by dart_eval
leptos - Build fast web applications with Rust.
android_rust_service - Android App with foreground service using Rust Native Libraries
slint - Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
chimera_flutter_code_push - This repository has been migrated.
vizia - A declarative GUI library written in Rust
bullseye - [WIP] A pure functional language that compiles to Dart.
druid - A data-first Rust-native UI design toolkit.