Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jan 2019 21:57:04 -0500
From:      Charlie Li <ml@vishwin.info>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Speculative: Rust for base system components
Message-ID:  <ec3faa51-9cbd-a7dd-cdd5-c370ce70d0d6@vishwin.info>
In-Reply-To: <CAG6CVpWJ=AOVt7zXZKCXqJnbtJ8U_EyYTpTHOVzpoRk5JDWjyA@mail.gmail.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--WcKsHgXKWO2yIbTvi8yA91jjdXfmfKWTe
Content-Type: multipart/mixed; boundary="ZkkhvVCngdltyx1cT0zYa9dSu54DbNx3m";
 protected-headers="v1"
From: Charlie Li <ml@vishwin.info>
To: freebsd-hackers@freebsd.org
Message-ID: <ec3faa51-9cbd-a7dd-cdd5-c370ce70d0d6@vishwin.info>
Subject: Re: Speculative: Rust for base system components
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>
In-Reply-To: <CAG6CVpWJ=AOVt7zXZKCXqJnbtJ8U_EyYTpTHOVzpoRk5JDWjyA@mail.gmail.com>

--ZkkhvVCngdltyx1cT0zYa9dSu54DbNx3m
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB-large
Content-Transfer-Encoding: quoted-printable

On 01/01/2019 19:35, Conrad Meyer wrote:
> The binary sizes are interesting:
>=20
> -r-xr-xr-x 3 root wheel  113640 Nov  4 15:47 /usr/bin/grep*
> -r-xr-xr-x 1 root wheel   89104 Oct 28 14:24 /usr/local/bin/ag*
> -rwxr-xr-x 1 root wheel 4284416 Oct 29 05:12 /usr/local/bin/rg*
>=20
> 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.
>=20
By default, the dynamic linking in rust binaries are limited to crt
unless a non-default flag is passed to rustc. Thus, this is effectively
static linking, albeit at an earlier stage like llvm-link(1). Rust is
not alone; golang is almost identical in this regard, by default.

ag also has next to no external dependencies at all, compared to
ripgrep's laundry list of crates it uses.

--=20
Charlie Li
Can't think of a witty .sigline today=E2=80=A6

(This email address is for mailing list use only; replace local-part
with vishwin for off-list communication)


--ZkkhvVCngdltyx1cT0zYa9dSu54DbNx3m--

--WcKsHgXKWO2yIbTvi8yA91jjdXfmfKWTe
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE/3/Cqr5a+41PbEb+jnB43vIDq2wFAlwsKIEACgkQjnB43vID
q2zCyxAAtTY4poLlcNBY0XCu/YsBf3Xf7A604XQgZu0K7QwPxYqv/BDr68AYBQw3
PHv9qne6r41gr0uam9tPoCu/p5uZ6bbtdLy0Cd7zlkJj0Jf727+5+WMqXLJXJCb8
MnZfo0bG+E+Czr6Du+tjK9W6JXLX2JCE0i50muctRKb8bZIoiVYJ68G+7ZuoyFxF
vpfmdULj+t6lCQIz8+3RTX0fc4eVLtYS7KMySBUmm42j/jbqwC+ed3bo5G0qAFzN
lY4H2n/WL2HHV1TrvrFpqL3yPBlB8mnRNP5JKW+HOyhI5CY/ovbQzI+CMaLDTTFp
3Orhx6dl47O9RuT6XhmN7Z1j1BgMZKZpxdkf3pOubAZmo2lt0dcSXZmIndsZ4X4e
m9AfoWoFA0C9MtGbXKo4sTkx7RmhJ/fqxfz/37BnvqhZ3YqvEYd7mza3xaAyloZM
04h5SkbpKO+icZMf17HzoYxYskYuwAMI9glRg3tJxzCL+UiUyvvzbbofkhW+Rsk1
Q/KhKvtTNGQl6m3W5ER0yGxogvjCrhlDYahvvOcsBYzHblmpg1sUN0ph3aXCsURO
9bZcTP2VO3EQslY05jtnq5gvkYA1+PSLl0duIU63ns154Ck5Ur7N8xK5vDgcy2ml
s/kpe/GOh37kiWC9A3ZxSgf/hNMgcrv1pLs1gDA6AnGvAqHerqo=
=Kjxe
-----END PGP SIGNATURE-----

--WcKsHgXKWO2yIbTvi8yA91jjdXfmfKWTe--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ec3faa51-9cbd-a7dd-cdd5-c370ce70d0d6>