Komac, the Kotlin program for creating Winget packages, has now been rewritten in Rust

In other news, URLs are now delimited by a space rather than a comma when updating manifests. Komac uses a very small amount amount of memory and has been heavily optimised to minimise memory usage (especially heap allocations). Updating Android Studio (a 1GB+ binary) consistently took just ~3.5mb memory. Komac now has a significantly more accurate way of checking if an installer was created with Inno/NSIS instead of just checking for some magic bytes. As of this release, the uncompressed x64 portable binary stands at just ~7.5mb and doesn't require runtimes like the JVM. The Windows installers add Komac to path (allowing you to just run komac in a terminal) and stand at less than 3.5mb.

u_tamtam,
@u_tamtam@programming.dev avatar

I have no idea what this is about, but was kotlin native considered here? And what ruled it out in favour of rust?

I’ve seen multiple JVM languages going the route of AOT/native compilation and now taking the spot of systems languages in some use cases (CLI utils, low footprint “cloud native” stacks, things requiring tight os-level integration) with often outstanding performance.

Aatube,
Aatube avatar

Kotlin/Native exists but I have to implement logic for each source set where I need to and most Kotlin libraries aren't fully multiplatform yet. Even if Kotlin/Native had a perfect ecosystem, Rust does not have a garbage collector, so there's no overhead there like there is in Kotlin/Native.

One of the biggest things in Komac currently is reading MSIs etc using native Windows APIs. I have to write lots of Java Native Access code in order to do so.

There's also a lot of things where I've had to implement something from scratch myself where in Rust, there is a crate that does it all for me. E.g. the interactive menus in Komac aren't amazingly versatile. In Rust, I'd use inquire.

https://github.com/russellbanks/Komac/issues/319

AnomalousBit,

I’m gonna rewrite your mom in rust

Traister101,

She’ll make all your friends nut blazingly fast

nitefox,

And they wont leak either

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programming@programming.dev
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines