fables-tales / rubyfmt

Ruby Autoformatter!
MIT License
1.07k stars 50 forks source link

extract ruby configuration for determining link libs #435

Closed froydnj closed 1 year ago

froydnj commented 1 year ago

We currently statically determine whether libz and libcrypt should be linked into the rubyfmt binary. A better approach (since Ruby can successfully be compiled without these libraries present, at the cost of functionality that rubyfmt doesn't use) is to query whether Ruby found these libraries on the system and output the necessary cargo directives based on that information.

froydnj commented 1 year ago

r? @reese

I think this + a similar patch for the main rubyfmt binary will make it so we can cross-compile to aarch64-linux-gnu without having to worry about the details of what libraries are available in the cross-compilation environment. cc @ilyailya