Gluon: A Nix-like functional language written in Rust

This would be fun to experiment with. One of the pain points I have with Nix is the lack of typing, which Gluon handles elegantly through extensive use of type inference.

Here’s a strawman GNU Hello derivation (from the Nix manual) in Gluon syntax:

let { stdenv, fetchurl, perl } = import! pkgs
let { File } = import! std.io

stdenv.mkDerivation {
    name = "hello-2.1.1"
    builder = File "./builder.sh"
    src = fetchurl {
        url = "ftp://ftp.nluug.nl/pub/gnu/hello/hello-2.1.1.tar.gz"
        sha256 = "1md7jsfd8pa45z73bz1kszpp01yw6x5ljkjk2hx7wl800any6465";
    }
    ...
    perl
}

As you can see it’s very similar to Nix syntax, minus semicolons and with imports.

5 Likes

Is it lazy?
At the first glance it seems eager

README says it’s strict

1 Like