Stream: cranelift

Topic: RISC-V IR


view this post on Zulip indolering (Mar 15 2026 at 02:57):

I've been tracking the blockchain VM space, and it seems like a lot of projects have converged on RISC-V-based VMs. What I find interesting is that they're lowering to a RISC-V VM as a distribution artifact. Has that influenced how y’all think about WASM and the Cranelift IR stack at all?

view this post on Zulip Chris Fallin (Mar 15 2026 at 04:17):

Not really? Wasm is a reasonable portable ISA all on its own; Cranelift follows a pretty established path in terms of abstraction level for a compiler IR (SSA CFG); I'm not sure what we would gain by trying to use a specific ISA as an IR rather than our existing one

view this post on Zulip Chris Fallin (Mar 15 2026 at 04:19):

In particular note that there is value in reifying Wasm semantics in an IR that is close to Wasm (CLIF takes explicit inspiration from Wasm for e.g. floating-point semantics and other things); and having a separate IR (VCode) close to the machine ISA; and an explicit lowering between them. I wrote about this ~5 years ago at https://cfallin.org/blog/2020/09/18/cranelift-isel-1/ when I introduced the design. Using a low-level thing "in the middle" would scramble all of the nice architectural properties we have there

view this post on Zulip Chris Fallin (Mar 15 2026 at 04:19):

Maybe you could say more specifically what sort of thoughts you have here?

view this post on Zulip indolering (Mar 15 2026 at 04:21):

I just find it really interesting that the unit of deployment for Ethereum code has turned out to basically be a RISC-V shaped virtual ISA. But I guess that has a lot to do with lowering the requirements to just zk proving.

view this post on Zulip Chris Fallin (Mar 15 2026 at 04:26):

Sure. I think they're solving a pretty different problem than Wasm; that's as far as I've thought about it

view this post on Zulip indolering (Mar 15 2026 at 04:28):

Do you have thoughts on Determinate Nix's use of WASM tech for reproducible build systems?

view this post on Zulip Chris Fallin (Mar 15 2026 at 04:30):

"hey that's pretty cool!" (more seriously: as someone who tried to use Nix for a while and then "fell off the wagon" back into impurity, I think it has much bigger papercuts that still need solving, but allowing little pure computations as part of builds is neat, and can't hurt)

view this post on Zulip indolering (Mar 15 2026 at 04:31):

Care to elaborate?

view this post on Zulip Chris Fallin (Mar 15 2026 at 04:34):

About which part?

view this post on Zulip indolering (Mar 15 2026 at 04:35):

What needs fixing in Nix?

view this post on Zulip Chris Fallin (Mar 15 2026 at 04:35):

I mean, that's a big topic and not really something I can offer you a ready-made essay on at the moment, sorry

view this post on Zulip indolering (Mar 15 2026 at 04:36):

It's a saturday evening, thank you for taking time to respond to me.

view this post on Zulip Chris Fallin (Mar 15 2026 at 04:36):

I will say that I hit several "I have no idea what's going on and it seems the build is broken" moments in the span of a few months while defining much of my dev environment under Nix, and the overzealous compiler patching always bit me in unexpected ways

view this post on Zulip Chris Fallin (Mar 15 2026 at 04:37):

I got tired of trying to "work around" the thing and decided that going against the grain wasn't really a good use of my time

view this post on Zulip Chris Fallin (Mar 15 2026 at 04:38):

I went down the route of "maybe I can use nix-ld to define an environment that looks just like my Debian dev machine" before, well, switching back to my Debian dev machine shrug

view this post on Zulip indolering (Mar 15 2026 at 04:42):

Yeah, the friction is real. I'm trying to use an OSTree distro and Bluefin is just polished enough to make it worth the hassle.


Last updated: Mar 23 2026 at 18:16 UTC