fastly / Viceroy

Viceroy provides local testing for developers working with Compute.
https://fastly.dev/learning/compute/testing/#running-a-local-testing-server
Apache License 2.0
150 stars 35 forks source link

Provide fully statically linked prebuilt executables for Viceroy #174

Open mgattozzi opened 2 years ago

mgattozzi commented 2 years ago

Issues like #120 will continue to come up so long as we dynamically link to system libraries. As we can't know whether customers will be using really old versions of Linux for whatever reason, we should provide executables that are fully statically linked. The main issue is making sure we statically link in glibc (or musl but we should probably stick to glibc if possible) and other system libs that Viceroy depends on. Given this forum post it should be possible, but we should identify any other system libraries or dependencies we might have as well.

This should alleviate any pain when using the fastly cli and for the most part whould make any of the fastly compute commands that use viceroy "Just Work™️"

kanevbg commented 1 year ago

Seem issue on RHEL8 image

mtr-fastly commented 1 year ago

Will dynamic linking still be fine for non-system libraries as long as they gracefully fail if library is not found?

tedmielczarek-fastly commented 1 year ago

For reference, sccache builds its release binaries by linking with musl. The workflow bits for that are here: https://github.com/mozilla/sccache/blob/62c8f0aa168037628058221448d2aab67fd7968d/.github/workflows/ci.yml#L110-L174

I mention this because sccache is probably of roughly similar complexity–it includes HTTP and a few other bits of crypto usage, tokio, etc.

joeshaw commented 1 year ago

Another resource: https://kobzol.github.io/rust/ci/2021/05/07/building-rust-binaries-in-ci-that-work-with-older-glibc.html

The containers mentioned are maintained by PyPA (the Python Packaging Authority).

tedmielczarek-fastly commented 4 days ago

The path of least resistance these days is to just use cargo-dist: https://opensource.axo.dev/cargo-dist/