Speculative: Rust for base system components

Garance A Drosehn drosih at rpi.edu
Wed Jan 2 11:25:06 UTC 2019


On 2 Jan 2019, at 6:06, Johannes Lundberg wrote:

> On 1/2/19 12:35 AM, Conrad Meyer wrote:
>>
>> All are dynamically linked and stripped amd64 binaries.  Ripgrep
>> (Rust) is 48x the binary size of ag and 37x that of grep(1).  Like
>> grep(1), 'ag' is written in C.

>
> Rust by default statically link everything in executable binaries.
> This is comparable to statically link in libc and all other
> dependencies in your C program. You can have Rust programs link
> against shared rust libraries (std, etc) and get the size down
> to basically same as C.
>
> If Rust is used in base and everything is built at the same time,
> with same version compiler, it would make sense to link dynamically
> I think.
>
> Switching topic a bit. Just wanted to also add my contribution,
> a simple sysctl Rust library
>    https://github.com/johalun/sysctl-rs .

Personally I think it's interesting and helpful to see some more
projects like this, so we can get a better understanding of how
well the language works for systems-level programs.  I'm going to
take a look at this, just for my own curiosity.   Thanks!

-- 
Garance Alistair Drosehn                =     drosih at rpi.edu
Senior Systems Programmer               or   gad at FreeBSD.org
Rensselaer Polytechnic Institute;             Troy, NY;  USA


More information about the freebsd-hackers mailing list