# Distributing via Source

**URL:** <https://internals.rust-lang.org/t/distributing-via-source/14255>\
**Category:** compiler\
**Created:** [March 12, 2021, 9:24pm UTC](https://internals.rust-lang.org/t/distributing-via-source/14255 "2021-03-12T21:24:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdnfgc](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/kdnfgc/32/7873_2.png) [@kdnfgc](https://internals.rust-lang.org/u/kdnfgc)\
**Post date:** [March 12, 2021, 9:24pm UTC](https://internals.rust-lang.org/t/distributing-via-source/14255/1 "2021-03-12T21:24:49Z")

</div>

One of my favorite parts of Arch Linux is the package manager (pacman). I like it because it downloads the packages quickly, and it compiles from source. I noticed that Cargo programs need to be distributed via pre-compiled binaries. I personally hate the way that binaries run, and I find that building from source further optimizes the program. Please consider a feature that allows the user to download the program, which compiles from source.

---

<div class="post-metadata">

**Author:** ![mbrubeck](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/mbrubeck/32/174_2.png) [@mbrubeck](https://internals.rust-lang.org/u/mbrubeck)\
**Post date:** [March 12, 2021, 9:33pm UTC](https://internals.rust-lang.org/t/distributing-via-source/14255/2 "2021-03-12T21:33:42Z")

</div>

This is exactly reversed. The [crates.io](http://crates.io) package repository distributes packages _only_ in source form. The `cargo install` command downloads the source code and compiles it locally.

The only pre-compiled binaries we distribute are components of the Rust toolchain itself (including the compiler, standard library, etc.). These can't be distributed in source form because Rust is self-hosting. (You need to install a Rust compiler before you can compile the Rust compiler.)

---

<div class="post-metadata">

**Author:** ![anp](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/anp/32/6036_2.png) [@anp](https://internals.rust-lang.org/u/anp)\
**Post date:** [March 13, 2021, 12:49am UTC](https://internals.rust-lang.org/t/distributing-via-source/14255/3 "2021-03-13T00:49:06Z")

</div>

> [@kdnfgc](#):
>
> Arch Linux is the package manager (pacman). I like it because it downloads the packages quickly, and it compiles from source

AUR packages are often (but not always) built from source, but as far as I know the official arch repos are all binary artifacts.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [June 11, 2021, 12:49am UTC](https://internals.rust-lang.org/t/distributing-via-source/14255/4 "2021-06-11T00:49:38Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
