:: Re: [DNG] NVMe: was Simple install …
Top Page
Delete this message
Reply to this message
Author: onefang
Date:  
To: dng
Subject: Re: [DNG] NVMe: was Simple install of devuan daedalus fails
On 2026-02-14 16:57:27, R A Montante, Ph.D. via Dng wrote:
> From: Steve Litt [1]<slitt@???>
>
> ... A Hello World Rust program's executable is over 3.6MB,
>
>    3.6MB ???  Dear lord.

>
>    ┌────────────────╥───────────────────────╥─────────────────────────┐
>    │   161 bytes    ║        hello.c        ║      command-line       │
>    ╞════════════════╬═══════════════════════╬═════════════════════════╡
>    │  12192 bytes   ║         hello         ║    Arm64 executable     │
>    ╞════════════════╬═══════════════════════╬═════════════════════════╡
>    │   411 bytes    ║     hello-com.asm     ║       16-bit x86        │
>    ╞════════════════╬═══════════════════════╬═════════════════════════╡
>    │    28 bytes    ║       hello.com       ║       Nasm on DOS       │
>    ╞════════════════╬═══════════════════════╬═════════════════════════╡
>    │   632 bytes    ║       hello.asm       ║         x86-64          │
>    ╞════════════════╬═══════════════════════╬═════════════════════════╡
>    │   448 bytes    ║         hello         ║  Linux/gas executable   │
>    ╞════════════════╬═══════════════════════╬═════════════════════════╡
>    │   1058 bytes   ║  hello-syscall-ld.s   ║          Arm64          │
>    ╞════════════════╬═══════════════════════╬═════════════════════════╡
>    │   1944 bytes   ║   hello-syscall-ld    ║  Linux/gas executable   │
>    └────────────────╨───────────────────────╨─────────────────────────┘


For the record, that polygLua thing I wrote lets you write Lua in any
language, it's hello world example includes hello world in lots of
languages - bash, Lua, Perl, PHP, Python, and C twice. That example also
includes a bunch of other test code.

The C code is run by tcc as a script. Likely the same as your hello.c
example above.

3739 bytes for the hello world and test script, with 16191 bytes for the
polygLua library itself. Could probably strip out at least half if I
condensed it down to just the hello world bits.

I wonder if the Rust Hello World is just a port of the ginormously
complex GNU C version?