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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Perseus – NextJS alternative in Rust

198 点作者 erlend_sh大约 2 年前

20 条评论

jbandela1大约 2 年前
I went down this Rust front end route with my trivia web app [0], but ended up abandoning it.<p>There were just too many points of friction.<p>* The tooling is not nearly as good as JavaScript for the front end.<p>* Every time you want to use a front end library, you have to figure it out yourself as there won’t be any documentation for how to use it with your framework.<p>* Rust compile times really break your flow when working on front end code. At least for me, for front end coding, there is a lot of interactive development where you look at the web app on desktop&#x2F;mobile and adjust element size&#x2F;spacing etc to make sure things look nice. Doing this in real-time with JavaScript&#x2F;html&#x2F;css is nice. Having a Rust compile between each step is a pain.<p>* For front-end code, Rust’s borrow checker really gets in the way. The JavaScript garbage collector works really well front front-end code. Rust’s borrow checker is not bringing any performance advantages for this use case and brings a lot of complexity. On the backend, you can justify the complexity of Rust with appeals to efficiency&#x2F;scalability&#x2F;server cost. With front end code which is running on the client, you lose that justification.<p>I ended up going with React&#x2F;TailwindCSS and have been happy so far.<p>0. triviarex.com
评论 #35504205 未加载
评论 #35502116 未加载
评论 #35504275 未加载
elAhmo大约 2 年前
If I were looking for an alternative in NextJS, looking for something built in Rust would definitely not be in top of my mind. I would assume this kind of movement from JS -&gt; Rust would be quite rare.
评论 #35501162 未加载
评论 #35504766 未加载
评论 #35501342 未加载
评论 #35501193 未加载
评论 #35502872 未加载
pachico大约 2 年前
I have this feeling that I am wasting my time by not learning Rust.<p>I am a proficient Go programmer but I have this sensation I cannot really describe about that not being enough.<p>I feel something similar with Zig.<p>Am I the only one?
评论 #35503897 未加载
评论 #35501258 未加载
评论 #35502639 未加载
评论 #35502713 未加载
评论 #35501266 未加载
评论 #35501933 未加载
评论 #35501428 未加载
评论 #35501839 未加载
评论 #35502339 未加载
评论 #35501456 未加载
评论 #35501230 未加载
评论 #35502269 未加载
评论 #35501689 未加载
评论 #35502384 未加载
评论 #35501334 未加载
评论 #35504372 未加载
评论 #35502024 未加载
erlend_sh大约 2 年前
Perseus is a state-driven web development framework for Rust with full support for server-side rendering and static generation.<p>v0.4.0 went stable today after a year of development: <a href="https:&#x2F;&#x2F;github.com&#x2F;framesurge&#x2F;perseus&#x2F;discussions&#x2F;270">https:&#x2F;&#x2F;github.com&#x2F;framesurge&#x2F;perseus&#x2F;discussions&#x2F;270</a>
评论 #35500823 未加载
评论 #35531420 未加载
评论 #35500883 未加载
评论 #35501036 未加载
评论 #35500829 未加载
评论 #35506433 未加载
评论 #35500606 未加载
评论 #35501034 未加载
quantumwoke大约 2 年前
Congrats on the release. I have to admit looking at the code samples, this looks like some pretty tough to swallow ergonomics for real-world usage. Is this inherent to Rust web libraries?
评论 #35501030 未加载
sesm大约 2 年前
If it’s a NextJS alternative then it supports client-side components too? Is client-side code written in Rust? Is it then compiled to JS or to WASM? Couldn’t find those answers from quick look at the website and GitHub page.
评论 #35502107 未加载
lucasyvas大约 2 年前
Great project! Tangential, but I&#x27;ve been thinking about this a lot lately and have an idea of what I&#x27;d like to see attempted next in this area.<p>Like many have said, the JS framework ecosystem (ok, while kind of a meme much of the time) is a total juggernaut.<p>I wouldn&#x27;t mind seeing some kind of.. unholy combination of SSR for JS frameworks with a Rust (or even other language) backend if it was feasible.<p>JS is still a lot more mature and ergonomic for front-end. Rust is kind of a chore for this kind of work currently. It works, but wasn&#x27;t designed for it and it feels a bit clumsy. On the flip side, Rust is a safe and super fast server language (Go a great choice as well, or others too).<p>I suppose I&#x27;d like to see some kind of framework that makes it easier to pair the two, instead of insisting that a single language isomorphic approach is best.<p>This might not be practical - I feel like routing might end up being a nightmare. I&#x27;m more just saying it seems harder to pair peanut butter with jelly than it should be and someone smarter than me could probably figure it out :). I&#x27;m naively guessing that as long as you had a JS interpreter on the server side, it could be made to work (no problem in Rust for either Node or Deno since embedding those is possible).<p>We&#x27;ve got thing like Next, SvelteKit, and Fresh. We&#x27;ve also got things like LiveView - there may be a further middleground between the two.
评论 #35504511 未加载
评论 #35503483 未加载
TobyTheDog123大约 2 年前
I truly do not understand this Rust-for-all-problems mentality.<p>I was under the impression that Rust was essentially the next generation of C, meant for things like compilers, embedded systems, and other places where memory truly matters.<p>Why are we shoehorning it into things like REST APIs and frontend frameworks? One look at that syntax and I&#x27;d think anyone could see it&#x27;s not the right tool for the job, even if there room for disruption in those spaces.
评论 #35506182 未加载
评论 #35507733 未加载
dawnerd大约 2 年前
I&#x27;m looking at the examples but it just looks like a lot more boilerplate than what I have when building a normal page in Nextjs.<p>But I also think their comparison table isn&#x27;t very fair. You can easily have perfect lighthouse scores in Nextjs, and Nextjs supports both SSG and SSR in the same file... not sure why it says otherwise. <a href="https:&#x2F;&#x2F;nextjs.org&#x2F;docs&#x2F;basic-features&#x2F;data-fetching&#x2F;incremental-static-regeneration" rel="nofollow">https:&#x2F;&#x2F;nextjs.org&#x2F;docs&#x2F;basic-features&#x2F;data-fetching&#x2F;increme...</a><p>And for the internationalization note saying it&#x27;s only partially supported <a href="https:&#x2F;&#x2F;nextjs.org&#x2F;docs&#x2F;advanced-features&#x2F;i18n-routing" rel="nofollow">https:&#x2F;&#x2F;nextjs.org&#x2F;docs&#x2F;advanced-features&#x2F;i18n-routing</a>
评论 #35506438 未加载
noobcoder大约 2 年前
This seems to be faster than Svelte. I guess its because of Sycamore under the hood <a href="https:&#x2F;&#x2F;rawgit.com&#x2F;krausest&#x2F;js-framework-benchmark&#x2F;master&#x2F;webdriver-ts-results&#x2F;table.html" rel="nofollow">https:&#x2F;&#x2F;rawgit.com&#x2F;krausest&#x2F;js-framework-benchmark&#x2F;master&#x2F;we...</a>
unconed大约 2 年前
I don&#x27;t know why I would replace JS code I can quickly mod and extend with a stack I have to compile and write in a whole different language in.<p>How am I supposed to ship plugins for these new rustified frameworks and build systems?
marmee大约 2 年前
Can someone please explain how Rust and frontend converge so often?<p>In my mind Rust is similar to C++ including the very ugly syntax and fixation on memory management, while frontend languages are well.. exactly not that. Why?
评论 #35505101 未加载
sbmthakur大约 2 年前
Next.js itself uses a compiler written in Rust.<p><a href="https:&#x2F;&#x2F;nextjs.org&#x2F;docs&#x2F;advanced-features&#x2F;compiler" rel="nofollow">https:&#x2F;&#x2F;nextjs.org&#x2F;docs&#x2F;advanced-features&#x2F;compiler</a>
jbergens大约 2 年前
Not the best ad for a new framework when the web site looks like this<p>[![image](<a href="https:&#x2F;&#x2F;www.linkpicture.com&#x2F;q&#x2F;Screenshot_20230409_233144_Materialistic_1.jpg)](https:&#x2F;&#x2F;www.linkpicture.com&#x2F;view.php?img=LPic643330b25134b953465961)" rel="nofollow">https:&#x2F;&#x2F;www.linkpicture.com&#x2F;q&#x2F;Screenshot_20230409_233144_Mat...</a>
byyll大约 2 年前
This has nothing to do with NextJS (and never claims to, only the author of the post does) other than targeting the web.
ckok大约 2 年前
I couldn&#x27;t find it in the docs but does this also support working in a htmx like mode? Where the server renders pages and it does partial updates of parts? Or what some frameworks now call server components?<p>Or is everything more like a initial render on the server and pure wasm from that time on?
Freedom2大约 2 年前
This is great! I&#x27;ve had a bit of a play around and the code examples are nice and easy to follow. Definitely liking it more than the JSX route that a lot of modern frameworks are taking these days - this way is much cleaner and easier to read.
评论 #35501101 未加载
jstummbillig大约 2 年前
What problem is this solving? It&#x27;s easy to spot ones that it&#x27;s introducing.
评论 #35503577 未加载
fuddle大约 2 年前
Great to see more options for Rust on the front-end. I&#x27;m looking forward to this eco-system maturing before using it in a prod environment.
iamgopal大约 2 年前
Equivalent to this in go ?