←back to thread

203 points dahlia | 1 comments | | HN request time: 0s | source
Show context
bschwindHN ◴[] No.45156696[source]
Rust with Clap solved this forever ago.

Also - don't write CLI programs in languages that don't compile to native binaries. I don't want to have to drag around your runtime just to execute a command line tool.

replies(9): >>45156782 #>>45156785 #>>45157057 #>>45157203 #>>45158148 #>>45159646 #>>45160365 #>>45161166 #>>45163035 #
MathMonkeyMan ◴[] No.45157057[source]
Almost every command line tool has runtime dependencies that must be installed on your system.

    $ ldd /usr/bin/rg
    linux-vdso.so.1 (0x00007fff45dd7000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x000070764e7b1000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x000070764e6ca000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000070764de00000)
    /lib64/ld-linux-x86-64.so.2 (0x000070764e7e6000)
The worst is compiling a C program with a compiler that uses a more recent libc than is installed on the installation host.
replies(7): >>45157725 #>>45157872 #>>45157947 #>>45157966 #>>45158276 #>>45161297 #>>45161300 #
1. 1718627440 ◴[] No.45161300[source]
> The worst is compiling a C program with a compiler that uses a more recent libc than is installed on the installation host.

This is only a problem, when the program USES a symbol that was only introduced in the newer libc. In other words, when the program made a choice to deliberately need that newer symbol.