TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Dioxus 0.5: Web, Desktop, Mobile Apps in Rust

314 点作者 jkelleyrtp大约 1 年前

24 条评论

terhechte大约 1 年前
I build a Mastodon client with Dioxus last year [1] and it was in general a good experience, but it was also clear that lots of things were still missing (I mean, it was also at version 0.2 when I started working on it).<p>With these 0.5 changes the Dioxus authors remove almost all the complexities that I ran into when working on Ebou. I haven&#x27;t played around with it yet, but the removal of lifetimes and constant cloning will make it a much more pleasant experience. I&#x27;m looking forward to trying it out, congratulations to the team for such an awesome release!<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;terhechte&#x2F;Ebou">https:&#x2F;&#x2F;github.com&#x2F;terhechte&#x2F;Ebou</a>
评论 #39852831 未加载
评论 #39856656 未加载
KolmogorovComp大约 1 年前
I&#x27;ve been following dioxus with interest despite not having a chance to use it yet.<p>However I&#x27;m a bit perplexed with the solution to remove lifetimes [0]. Isn&#x27;t it a poor&#x27;s-man GC? What was the performance impact?<p>[0]: <a href="https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;generational-box" rel="nofollow">https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;generational-box</a><p>Side-note: `[generational-box](<a href="https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;generational-box" rel="nofollow">https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;generational-box</a>)` link is broken
评论 #39852820 未加载
评论 #39853080 未加载
skybrian大约 1 年前
I’m not a Rust programmer, but I’m curious, and I’m wondering if someone could explain how their generational-box crate works? [1]<p>I understand that it’s some kind of arena allocation, but I don’t understand how they support copying without copying, or how this is safe:<p>&gt; Internally, generational-box creates an arena of generational RefCell&#x27;s that are recycled when the owner is dropped. You can think of the cells as something like &amp;&#x27;static RefCell&lt;Box&lt;dyn Any&gt;&gt; with a generational check to make recycling a cell easier to debug. Then GenerationalBox&#x27;s are Copy because the &amp;&#x27;static pointer is Copy<p>Like okay, you can create a pointer to static data, but what if it’s something that doesn’t have a static lifetime?<p>[1] <a href="https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;generational-box" rel="nofollow">https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;generational-box</a>
评论 #39853834 未加载
评论 #39853291 未加载
m0meni大约 1 年前
Been following this for a while and super excited to see it out! I love how Dioxus captures a lot of what made React successful, but also while innovating on top of it and shipping at a super fast rate.<p>Congrats to the team. Excited to try out the signals in this release.
airstrike大约 1 年前
I kinda wish instead of RSX we got something closer to SwiftUI than to React&#x2F;JSX<p>I feel like despite the name and all the good it did for JS and the web, React is not exactly how I would envision &quot;reactive UI&quot; code to look like in 2024 if we have the choice of designing a language (or DSL) from a blank state<p>Which is not to say SwiftUI is perfect, but whatever code I write with it feels much more neatly organized &#x2F; compartmentalized than similar code using React<p>IMHO the only real advantage of using JSX for cross-platform GUIs is... to reuse existing libraries that were built for the web, which means something like RSX has very little &quot;transferable value&quot; other than letting the developer transfer their conceptual knowledge of JSX to RSX. I&#x27;d argue that&#x27;s a worse tradeoff than having the developer learn some new paradigm that is (again IMHO) objectively superior to the React&#x2F;JSX one<p>TL;DR &quot;SwiftUI but cross-platform&quot; is the project I wish existed but doesn&#x27;t. I&#x27;m aware of @Tokamak&#x2F;TokamakUI but that&#x27;s still very much incomplete and activity seems to have waned
评论 #39857238 未加载
sanity大约 1 年前
I just picked Dioxus to build a decentralized homepage for Freenet[1], it will be the first decentralized website people see when they get Freenet set up. It reminds me a bit of my Kotlin web framework called Kweb[2] that I&#x27;ve been working on on-and-off for a few years now, particularly the way it handles state and the DSL that maps from code to HTML. So far I like what I see.<p>[1] <a href="https:&#x2F;&#x2F;freenet.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;freenet.org&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;kweb.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;kweb.io&#x2F;</a>
评论 #39855402 未加载
yunohn大约 1 年前
How does this compare to Tauri?
评论 #39852517 未加载
评论 #39861068 未加载
palmfacehn大约 1 年前
How does this render native apps? Is it still within a browser instance of some kind?
评论 #39852714 未加载
swsieber大约 1 年前
&gt; There’s still a tiny bit of unsafe floating around various dependencies that we plan to remove throughout the 0.5 release cycle<p>I&#x27;d love to see what these usages are, and what motivates this. I understand that sometimes people reach for unsafe too eagerly. But the std is full of unsafe and drawing the line there sometimes seems like a line in the sand.
评论 #39853528 未加载
评论 #39854364 未加载
WuxiFingerHold大约 1 年前
Honest question: I get why React has created the naming convention of &quot;use*&quot; for their hooks API. It makes sense to me. But why is in Dioxus creating a new signal called &quot;use_signal&quot;? This function call creates a new signal, doesn&#x27;t it? The signal is not recreated on every rendering (that&#x27;s the whole point of signals).<p><pre><code> let mut count = use_signal(|| 0); </code></pre> In SolidJS you create a signal with createSignal, which makes much more sense to me.<p><pre><code> const [count, setCount] = createSignal(0) </code></pre> The naming of the API matters, because state hooks behave much differently and might have complementing needs like &quot;useMemo&quot;.<p>Is there a reason Dioxus for the &quot;use_signal&quot; naming other than trying to be close to React?
评论 #39866544 未加载
rtp4me大约 1 年前
Congrats to the team! I know it has been a long process, but kudos for sticking with it!
评论 #39852543 未加载
dasloop大约 1 年前
&quot;Here at Dioxus Labs, we have an unofficial rule: only one rewrite per year.&quot;<p>If you have to rewrite your code once a year, maybe it helps to plan ahead before coding.<p>But, if you can rewrite your code once a year, you might not have too much code to worry about.
评论 #39852687 未加载
CJefferson大约 1 年前
Congratulations on the new release!<p>How is the support for SVG which I can interact with? I’m thinking of something like drawing a sudoku as an SVG, then letting people click on each cell.
评论 #39859712 未加载
J_Shelby_J大约 1 年前
I&#x27;m really excited about this project because it means you can build a single app and deploy it easily anywhere. And in a single language.
评论 #39856049 未加载
nirvdrum大约 1 年前
Does anyone know how well this integrates with web components? I struggled getting Shoelace components to run well with Yew. It was doable, but by the time I had it working I decided I was using the wrong tool for the job. I&#x27;d like to revisit that project with another Rust framework though when I can find the time.
评论 #39857785 未加载
antifa大约 1 年前
I did a `dx build --release --platform web` of their default client-only web template and the resulting `du -sh dist&#x2F;` is 2.1M. The .wasm file is 1.9M.<p>I&#x27;m guessing there is no way that&#x27;s getting smaller?<p>I have some projects in the 1kb to 100kb territory I wouldn&#x27;t mind rewriting, but not to that size.
评论 #39866918 未加载
zengid大约 1 年前
Huge release, congrats! I&#x27;m most interested in Dioxus-Blitz. Congrats to Nico for joining the team (I think?).
评论 #39854942 未加载
ashia大约 1 年前
Congrats on the launch! Really excited to see the move to signals + curious to see how Blitz 2.0 goes.
osener大约 1 年前
How does Dioxus fare as a native GUI lib? Last time I checked the focus was on web targets and both the built in wgpu renderer and skia backend were not supported as much.
评论 #39856691 未加载
politician大约 1 年前
Dioxus is framework that compiles Rust to WebAssembly in order to build a webapp that uses the native OS webbrowser for rendering and interaction.
评论 #39853879 未加载
freeopinion大约 1 年前
Is any part of the existing ecosystem that expects Scope usable in a new world without Scope?
评论 #39865935 未加载
hotfixguru大约 1 年前
Yesterday there was another really interesting rust library, egui, on the front page of HN. I can tell that this is more like react, but how do they compare in other regards?
评论 #39853679 未加载
macawfish大约 1 年前
I especially like the blurb at the bottom about the blitz rewrite using servo!
catlover76大约 1 年前
I am pretty interested, but can I not use TS&#x2F;JS for the UI if I want to?