RSSAmplifier

Blog

Simonas Kazlauskas’ blog

kazlauskas.meRSS feed ↗10 posts

Latest posts

Rack-mount N100-based firewall at 10W idle from CWWK

For a couple years now the main com­pute in my homelab rack has been served by an EPYC 7642-­based serv­er. It has been re­spons­ible every single task I have for short- and long-run­ning com­pute at home: home auto­ma­tion util­it­ies, me­dia center, net­work-at­tached stor­age with a re­l­at­ively fault-tol­er­ant disk setup, a build server… and most not­ably for the topic at hand the…

Tailscale doesn’t quite suck

Some­time last year I found my­self need­ing to spend all of the fake Amazon money that I keep re­ceiv­ing with every busi­ness trip. With dog­go’s fur shed­ding sea­son right around the corner, a va­cuum ro­bot def­in­itely seemed like an ap­pro­pri­ate way to con­sume at the time. But wait… there’s a snag! Well built va­cu­ums at a reas­on­able price point all hap­pen to be China Ex­port…

Due to limitations in the borrow checker, this implies a 'static lifetime

For the past six months or so I have been work­ing on finite-wasm , a pro­ject aimed at en­for­cing de­term­in­istic re­source lim­its (in time and space) in a runtime ag­nostic and Easy to Reason About way. This pro­ject pro­duces a spe­cific­a­tion (or rather ad­di­tions to the WebAssembly spe­cific­a­tion ) de­tail­ing how these lim­its should be en­forced and ana­lyses im­ple­ment­ing the…

A beets driven FLAC web radio with liquidsoap

My com­puters are setup in a way that most would con­sider awk­ward. In­spired some­what by the idea of a large main­frame with thin ter­min­als ac­cess­ing it, the most (and only) cap­able com­puter I own is a head­less home serv­er. This server is re­spons­ible for com­pil­ing all the code I work on, run­ning all of the ser­vices I de­pend on (wire­guard, dns, etc.) and stor­ing the all of my…

Fast page maps for JIT

I have been think­ing about ways to op­tim­ize a work­load that util­izes a WebAssembly runtime with JIT code gen­er­a­tion cap­ab­il­it­ies a lot re­cently. This runtime im­ple­ment­a­tion util­izes a fairly typ­ical con­struc­tion for a JIT-­based en­gine, how­ever the work­load util­izes the runtime in some­what an un­usual man­ner. Every time some func­tion within a mod­ule is in­voked, it…

Context-preserving error handling

Er­ror hand­ling story in Rust is still in flux, with people fig­ur­ing out their pre­ferred ways to get er­rors handled and propag­ated. At Stand­ard we’ve been im­ple­ment­ing cus­tom er­ror types 1 al­most ex­clus­ively, for both bin­ary and lib­rary crates, to great ef­fect. As I’ve seen many people struggle to ap­ply a sim­ilar pat­tern to their own code, I’m tak­ing an op­por­tun­ity to add…

Rust in 2020

This is my re­sponse to the call for blog posts on what Rust de­vel­op­ment fo­cus ought to be dur­ing 2020. Much un­like my ex­tremely late post for 2019 , which fo­cused en­tirely on com­piler im­ple­ment­a­tion de­tails, the fo­cus is on things that af­fect the end user ex­per­i­ence, spe­cific­ally the ex­per­i­ence past the ini­tial rose-­col­oured glasses phase of ad­op­tion. Fig­ure out…

The steps towards rustc, the great optimiser

It has been more than 3 years now since the MIR ini­ti­at­ive has been ac­cep­ted . Just a year after it has been en­abled by de­fault to all the users of nightly Rust. Even then, it was fairly clear that MIR is well po­si­tioned to en­able op­tim­isa­tions that would, in many in­stances, res­ult in sig­ni­fic­antly faster com­pil­a­tion. “This would be achieved by op­tim­ising the gen­eric code”,…

What makes [T]::align_to work

A few days ago, a pull re­quest to sta­bil­ise one of my fa­vour­ite lib­rary func­tions, [T]::align_to has landed. Since the func­tion, to the best of my know­ledge, has no coun­ter­parts in other lan­guages 1 , I really wanted to de­tail what it took to make this func­tion pos­sible. [T]::align_to de­scribes it­self as such: pub unsafe fn align_to<U>(&self) -> (&[T], &[U], &[T]) Trans­mute the…

Transcript: Should you Rust in embedded in 2018?

This is a tran­script of a talk I gave at the Vil­nius Rust meetup. You can down­load slides here or simply fol­low along. Note that con­tent on this page will get out­-of-d­ate fairly quickly (within months), so check the date above. It would not be an ex­ag­ger­a­tion to say that em­bed­ded is om­ni­present. You can find em­bed­ded firm­ware every­where from fridges, mi­crowaves and per­sonal…