Dusky

A general-purpose, statically typed language with its own runtime: a bytecode VM, garbage collection and lightweight tasks built in.

🚧 Very early work in progress · latest: v0.16 Shigeo

A taste

import "std/http"
import "std/io"

func main() -> !void
    let server = try http::listen("0.0.0.0", 8080)
    io::println("listening on ${server.port()}")

    # every connection runs in its own lightweight task
    server.serve(func(req: http::Request) -> !http::Response
        when req.path
            "/" then return http::text("hello ${req.query_param("name") orelse "world"}") end
            else then return http::status(404) end
        end
    end)
end

What's inside

Install

Dusky is built from source. You need Zig 0.16.0.

git clone -b release https://github.com/duskylang/dusky.git
cd dusky
zig build -Doptimize=ReleaseFast
./zig-out/bin/dusk hello.dsk

This builds the latest release. See the build guide for details.