Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jan 2019 11:40:51 +0000
From:      Johannes Lundberg <johalun0@gmail.com>
To:        Garance A Drosehn <drosih@rpi.edu>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Speculative: Rust for base system components
Message-ID:  <ae5f812f-0ea1-774e-438d-ade58a06e724@gmail.com>
In-Reply-To: <AC2473C1-DCA9-47D2-943F-150B38E902C9@rpi.edu>
References:  <20190101045638.D280E1F56@spqr.komquats.com> <a2d04773-c7cc-457d-4db6-913cb84e885b@metricspace.net> <CADWvR2izXwGRwkWn52x6s3U73ki5Qdg98Y-00use=G9febhrGA@mail.gmail.com> <4ea0612bbad08e61a15d495459b2bede@rpi.edu> <CAG6CVpWJ=AOVt7zXZKCXqJnbtJ8U_EyYTpTHOVzpoRk5JDWjyA@mail.gmail.com> <804bd7ee-d9c3-08ba-031f-df0348860d35@gmail.com> <AC2473C1-DCA9-47D2-943F-150B38E902C9@rpi.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

On 1/2/19 11:28 AM, Garance A Drosehn wrote:
> 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!
>
You're welcome! Oh, I forgot my most recent tool:

https://github.com/johalun/pperf

It's similar to iperf and useful for simulating many clients making 
short connections to ranges of IP addresses. The source code is 
ridiculously short and simple, showing how powerful Rust is when writing 
(safe and bug free) multi-threaded programs (of course with the use of 
some 3rd party crates).





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ae5f812f-0ea1-774e-438d-ade58a06e724>