fullstorydev / grpcui

An interactive web UI for gRPC, along the lines of postman
MIT License
5.23k stars 388 forks source link

Disable CGO for improved compatibility across distros #276

Closed gpassini closed 1 year ago

gpassini commented 1 year ago

This PR disables CGO so we don't have any dependencies on C libraries expected to be found in the environment, in order to achieve a better compatibility across distros.

Tested by running make install before and after the changes and inspecting the produced binary from a Linux machine (Debian in this case). Before

ldd $(which grpcui)
    linux-vdso.so.1 (0x00007ffe2cb2e000)
    libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fcc13946000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fcc13924000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcc13750000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fcc1396a000)

After

ldd $(which grpcui)
    not a dynamic executable

Follow-up of the same changes in grpcurl: https://github.com/fullstorydev/grpcurl/pull/420