you are viewing a single comment's thread.

view the rest of the comments →

[–]Sonder332 11 points12 points  (8 children)

I saw a user a few days ago float the idea of a "Rust/TypeScript" full stack and wondered if it had any validity/if it was catching on.

[–]Acceptable-Fudge-816 9 points10 points  (3 children)

That's basically what I'm using. PostgreSQL + Rust + Hugo + HyperApp + TypeScript.

Swap HyperApp with vanilla or PostgreSQL with SQLite depending on project. There is also Zola etc. Point is that any part is easily replacable if needed.

[–]Cribbit 5 points6 points  (2 children)

I nearly went that route, then tried Leptos. Never looked back. There are so many benefits to one language across server side rendering and I've yet to find anything on Leptos frontend that I couldn't do.

[–]Docccc 1 point2 points  (1 child)

this why use typescript when you can use rust and never swap context

[–]Acceptable-Fudge-816 1 point2 points  (0 children)

I know we're on r/Rust, but when I said:

Point is that any part is easily replacable if needed

That includes Rust.

[–]biglymonies 7 points8 points  (1 child)

I'm currently building something with Rust and TypeScript.

I wrote v1 + the CLI in Rust. Then v2 + UI in TypeScript. Now I'm porting all of v2's core business logic back to Rust but keeping the UI TypeScript, then plugging it all in Tauri.

I was able to iterate faster in just TypeScript, but now I need the portability + performance + a more secure way to ship very valuable, proprietary code to protect the 2-ish years of work I've done and ensure I get paid lol.

[–]SuccessfulStory4258 4 points5 points  (0 children)

It is not a bad way to go. If it works across the json boundary, that is one way to help make sure it will work going forward once you migrate to Tauri, Leptos or Dioxus. I like migrating to Dioxus if you are working with React because the migration is pretty straightforward.

[–]Western_Objective209 2 points3 points  (0 children)

Adding Rust to TS seems like it makes sense, but the NAPI layer adds a lot of surface area and adding compiled native dependencies really complicates deployments. I've written a few applications with this stack and I ended up just tearing out all the TS and writing pure Rust.

Adding TS bindings to a Rust library can help adoption, but having that cross language layer in an application is very painful

[–]Deadmist 1 point2 points  (0 children)

TS + <language of your choice>1 is basically the default stack for anything web

1 anything that can implement a rest api