Hacker News new | ask | show | jobs
by petra 29 days ago
When porting an app this way, don't functions/classes preserve the same functionality ?
2 comments

Well not really? You are going from a webpage (Electron) to a native application via Rust. Say you port a React website to a Rust native application, is anything about that code actually similar?
With GPUI quite a lot can be shared. Styling is similar, components can have same names. If your application logic is already cleanly separated, the resulting code can be quite similar.
I think there are lots of common patterns you find in GC’d languages that don’t translate well into idiomatic rust.

Consequently, porting my game engine from Java to Rust was more challenging than I had anticipated.