The tinyrocket article you link to is interesting. The author had to jump 
through a ton of hoops and then compress the binary with UPX to get values 
comparable to "nim -d:release && strip". Rust just doesn't provide enough 
advantages over Nim for me to go through that.

Getting Rust to work on OpenWrt cross toolchains is also a pain, Nim on the 
other hand is a breeze to integrate into the buildroot.

Just out of curiosity, I also did a spot check of the ram usage of both my 
binaries using pmap. It seems that rust is also a bit of a memory hog in 
comparison to nim: 
    
    
    Nim:    11,140K
    Rust:  545,104K
    
    
    Run

I find this result very interesting. The Rust binary had only served 1 JSON API 
request of a few (static) bytes, whilst the Nim binary had been running for a 
few hours, had served maybe 50-100 requests, and was maintaining state, and a 
USB connection. I would have expected Rusts "borrow checking" memory allocation 
to be fairly efficient, but obviously it isn't!

Reply via email to