It always amazes me when new languages start out and their implementations include a huge pile of crap by default.

Virgil is different, it only includes the stuff which is reachable from main(). In fact the entire compiler is organized around only compiling reachable code into the binary.

Even including the entire runtime and garbage collector, about (8KiB), there isn't much smaller you can get:

HelloWorld.v3: def main(a: Array) {

System.puts("Hello World!\n");

}

-rwxr-xr-x 1 titzer wheel 80 May 16 13:59 HelloWorld-jar

-rwxr-xr-x 1 titzer wheel 9088 May 16 13:59 HelloWorld-x86-darwin

-rwxr-xr-x 1 titzer wheel 5744 May 16 13:58 HelloWorld-x86-darwin-nogc

-rwxr-xr-x 1 titzer wheel 4132 May 16 13:58 HelloWorld-x86-darwin-nort

-rwxr-xr-x 1 titzer wheel 4692 May 16 13:59 HelloWorld-x86-linux-nogc

-rwxr-xr-x 1 titzer wheel 340 May 16 13:59 HelloWorld-x86-linux-nort

-rw-r--r-- 1 titzer wheel 6309 May 16 13:59 HelloWorld.jar

-rw-r--r-- 1 titzer wheel 63 May 16 13:57 HelloWorld.v3

-rw-r--r-- 1 titzer wheel 3486 May 16 14:04 HelloWorld.wasm

-rw-r--r-- 1 titzer wheel 256 May 16 14:46 HelloWorld-nogc.wasm

(the executable files are, well, the executables). The Linux executable without runtime or GC is literally 340 bytes, the wasm executable without GC is 256 bytes. The x86-darwin-nort binary is large because apparently Mach-O executables don't work right unless they are at least one 4KiB page in size.

I wanted to check that out, but it seems the homepage at http://compilers.cs.ucla.edu/virgil/ is broken, the webserver doesn't include the server side includes (e.g. linkbar.inc, footer.inc)