From owner-freebsd-hackers@freebsd.org Wed Jan 2 11:25:06 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16794143FBC8 for ; Wed, 2 Jan 2019 11:25:06 +0000 (UTC) (envelope-from drosih@rpi.edu) Received: from smtp10.server.rpi.edu (smtp10.server.rpi.edu [128.113.2.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "canit.localdomain", Issuer "canit.localdomain" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C4F0B8745B for ; Wed, 2 Jan 2019 11:25:04 +0000 (UTC) (envelope-from drosih@rpi.edu) Received: from smtp-auth1.server.rpi.edu (smtp-auth1.server.rpi.edu [128.113.2.231]) by smtp10.server.rpi.edu (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id x02BP1Lk021068 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 2 Jan 2019 06:25:02 -0500 Received: from smtp-auth1.server.rpi.edu (localhost [127.0.0.1]) by smtp-auth1.server.rpi.edu (Postfix) with ESMTP id D2C2D5802A; Wed, 2 Jan 2019 06:25:01 -0500 (EST) Received: from [192.168.2.22] (cpe-72-224-11-59.nycap.res.rr.com [72.224.11.59]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: drosih) by smtp-auth1.server.rpi.edu (Postfix) with ESMTPSA id A92035805D; Wed, 2 Jan 2019 06:25:01 -0500 (EST) From: "Garance A Drosehn" To: "Johannes Lundberg" Cc: freebsd-hackers@freebsd.org Subject: Re: Speculative: Rust for base system components Date: Wed, 02 Jan 2019 06:28:50 -0500 X-Mailer: MailMate (1.11r5462) Message-ID: In-Reply-To: <804bd7ee-d9c3-08ba-031f-df0348860d35@gmail.com> References: <20190101045638.D280E1F56@spqr.komquats.com> <4ea0612bbad08e61a15d495459b2bede@rpi.edu> <804bd7ee-d9c3-08ba-031f-df0348860d35@gmail.com> MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP X-Bayes-Prob: 0.0001 (Score 0, tokens from: outgoing, @@RPTN) X-Spam-Score: 0.00 () [Hold at 10.10] X-CanIt-Incident-Id: 03Xjnp2p8 X-CanIt-Geo: ip=72.224.11.59; country=US; region=New York; city=Troy; latitude=42.7495; longitude=-73.5951; http://maps.google.com/maps?q=42.7495,-73.5951&z=6 X-CanItPRO-Stream: outgoing X-Canit-Stats-ID: Bayes signature not available X-Scanned-By: CanIt (www . roaringpenguin . com) on 128.113.2.230 X-Rspamd-Queue-Id: C4F0B8745B X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dmarc=pass (policy=none) header.from=rpi.edu; spf=pass (mx1.freebsd.org: domain of drosih@rpi.edu designates 128.113.2.230 as permitted sender) smtp.mailfrom=drosih@rpi.edu X-Spamd-Result: default: False [-3.95 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:128.113.2.225/28]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; NEURAL_HAM_SHORT(-0.92)[-0.923,0]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[230.2.113.128.list.dnswl.org : 127.0.11.2]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[rpi.edu,none]; MX_GOOD(-0.01)[mail.rpi.edu]; IP_SCORE(-0.02)[country: US(-0.08)]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:91, ipnet:128.113.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2019 11:25:06 -0000 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@rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA