Live data from Hacker News

Topcoat: The full full-stack framework for Rust

github.com

41–50 of 51 posts

Re: Topcoat: The full full-stack framework for Rust

#41
post #40

This looks great, it looks like something I'd use long term instead of Typescript. I do see a couple of things missing before I could port my web app over. Integration with - Design systems such as Shadcn or Radix UI. An example on how to integrate with an OpenAPI endpoint.

All on the roadmap :) topcoat-ui is already usable with Shadcn components (recent Pr: https://github.com/tokio-rs/topcoat/pull/118) we are still working on pulling in more components.

Re: OpenAPi you want to consume or provide an OpenAPI endpoint? I’m assuming you want to provide one. This is probably on the medium term roadmap after other stuff like UI, tighter ORM integration, email, etc…

Re: Topcoat: The full full-stack framework for Rust

#43

Earlier quoted context omitted.

Oh cool, I will poke around Toasty. I am in the process of having LLM switch a project from some raw sqlx jank to Diesel, and mildly annoyed about some the boilerplate Diesel involves. Will have to see if Toasty solves it and whether it lets one query for arbitrary structs and add fields to structs from query results (e.g., in the README example for Toasty, explicitly joining on TODOs and mapping them to a simple fie…

> Will have to see if Toasty solves it and whether it lets one query for arbitrary structs and add fields to structs from query results (e.g., in the README example for Toasty, explicitly joining on TODOs and mapping them to a simple field on the User objects as opposed to using ORM `has_many`) I'm not 100% following. Feel free to ping me in discord ( https://discord.gg/tokio ) or open an issue on Toasty and we can d…

My "arbitrary structs" thing is exactly what Aeltoth was discussing in the Discord a couple days ago.

For the other part, I am basically saying I don't like, if one has a FK from Posts to Users, the ORM semantics of having user.posts automatically eagerly populated OR Deferred. I personally prefer to write SQL DSL in whatever language I am using whenever there is a join and explicitly add gather and add the posts. But I should probably get over that. Most of the time that is more cumbersome and having them eagerly there reliable is usually what I want anyways.

Re: Topcoat: The full full-stack framework for Rust

#45
post #13

Exciting, but I’d give a lot for an equivalent to Django. There are very few problems I need to solve that are fixed by htmx style “full stack” apps, but many that are solved by the generated admin, authentication framework, caching, eventing etc. Unfortunately, you end up bound to Python’s poor performance and poor typing stories, which Rust solves in spades.

Here's a v0.0.2 jinja2rs built on minijinja with optional python compatibility; CompatMode::Django(…) Django template language (filters, app-directory loader, auto-escape) : jinja2rs::filters : https://github.com/westurner/dsport/blob/main/src/jinja2rs/s... jinja2rs::filters::django : https://github.com/westurner/dsport/blob/main/src/jinja2rs/s... Which Rust components are like the Django ORM and django.contrib.admin…

When I searched for that last sentence in full, I found this:

dj-bolt/django-bolt: Rust-powered API framework for Django achieving 60k+ RPS. Uses Actix Web for HTTP, PyO3 for Python bridging, msgspec for serialization. Decorator-based routing with built-in auth and middleware. https://github.com/dj-bolt/django-bolt :

> Faster than FastAPI, but with Django ORM, Django Admin, and Django packages. [...] Django-Bolt is a high-performance API framework for Django, providing Rust-powered API endpoints capable of 188k+ RPS.

Re: Topcoat: The full full-stack framework for Rust

#46
post #40

This looks great, it looks like something I'd use long term instead of Typescript. I do see a couple of things missing before I could port my web app over. Integration with - Design systems such as Shadcn or Radix UI. An example on how to integrate with an OpenAPI endpoint.

All on the roadmap :) topcoat-ui is already usable with Shadcn components (recent Pr: https://github.com/tokio-rs/topcoat/pull/118 ) we are still working on pulling in more components. Re: OpenAPi you want to consume or provide an OpenAPI endpoint? I’m assuming you want to provide one. This is probably on the medium term roadmap after other stuff like UI, tighter ORM integration, email, etc…

This would be consuming an openapi endpoint from my rust service generated using utoipa. Currently I generate an openapi.yaml file and use openapi-typescript to generate the api bindings.

Re: Topcoat: The full full-stack framework for Rust

#47

I don't feel like this is solving the painpoints I feel in the Rust web framework ecosystem. And how is it full-stack if they don't have anything for the DB layer in here?

Likewise. I'm commenting based on my position: - Rust Fanboy; use it in several domains (embedded, PC applications, bio/chem) - Web dev is the main thing I still use Python for, as there's nothing on Django's level. Of interest: I am not a fan of Async in rust. I get that for web stuff it is a suitable model, but I still don't like it for no original reasons. As you stated, I don't feel like this is solving the missi…

Shameless plug: the lack of a fully batteries-included framework (with DB, auto migrations, admin, etc.) is one my biggest gripes in Rust - and that's why I've been developing https://cot.rs/ for a while.

Re: Topcoat: The full full-stack framework for Rust

#48
post #13

Exciting, but I’d give a lot for an equivalent to Django. There are very few problems I need to solve that are fixed by htmx style “full stack” apps, but many that are solved by the generated admin, authentication framework, caching, eventing etc. Unfortunately, you end up bound to Python’s poor performance and poor typing stories, which Rust solves in spades.

Shameless plug: I've been developing https://cot.rs/ for a while, which is strongly inspired by Django, and auto migrations, admin panel, auth, etc. are among the features supported by Cot.

Re: Topcoat: The full full-stack framework for Rust

#49
post #48
post #13

Exciting, but I’d give a lot for an equivalent to Django. There are very few problems I need to solve that are fixed by htmx style “full stack” apps, but many that are solved by the generated admin, authentication framework, caching, eventing etc. Unfortunately, you end up bound to Python’s poor performance and poor typing stories, which Rust solves in spades.

Shameless plug: I've been developing https://cot.rs/ for a while, which is strongly inspired by Django, and auto migrations, admin panel, auth, etc. are among the features supported by Cot.

Thanks, I'll take a look!

Re: Topcoat: The full full-stack framework for Rust

#50
post #27

I didn't expect to see this here yet. We opened up the repo because we ran out of private CI usage. A blog post is coming next week :). Happy to answer questions here though. One thing to keep in mind, the main reason for Topcoat to exist is that many organizations are already using Rust for infrastructure-level or performance sensitive reasons and often just want to build a web app using the programming language the…

Great initiative from the folks at tokio. How does it aim to be different from loco.rs https://github.com/loco-rs/loco ?

The last loco.rs release was 1 year ago. I wonder what happens with it.
Post reply on HN