dfarrel1 / peeler

0 stars 1 forks source link

Enable statically linked builds #12

Open dlf-dds opened 1 year ago

dlf-dds commented 1 year ago

@GyulyVGC can I get your thoughts on this? I want to remove all dependencies on deployment. It appears that you are doing this for sniffnet, yeah?

GyulyVGC commented 1 year ago

I ship Sniffnet as a single executable file, but I think the situation is a bit different since Sniffnet is a binary while your project aims at being a library.

What would you like to do more precisely?

dfarrel1 commented 1 year ago

I would like to deploy the downstream application that uses this crate, peeler (and that also uses the pcap crate) to an ubuntu OS machine and relieve the deployment process of any dependencies at all. I'd like to build a binary that has statically linked all dependencies at build. Currently it is dynamically linking libcap.so because the pcap crate is dependent on it. I'm trying to statically link libcap at build, but I haven't managed to figure it out yet.

dfarrel1 commented 1 year ago

https://github.com/dfarrel1/peeler/tree/staticallylink

dfarrel1 commented 1 year ago

I'm using peeler as an initial proof of concept. I figure the changes should be the same, at least regarding pcap, on the other application that I'm working on.

GyulyVGC commented 1 year ago

Umm, I think I may not be able to help you on this... all I do for Sniffnet is just bundling the executable for different platforms without worrying too much about dependencies