RustConf 2018 - Space, The Rusty Frontier by Ryan Plauche

  Рет қаралды 2,865

Rust

Rust

Күн бұрын

Пікірлер: 2
@Polaris64
@Polaris64 5 жыл бұрын
It's worth noting that by default Rust binaries are linked statically to the standard library, which is why the executable file size can be large. There is a way to link dynamically to libstd (and others) using the "-C prefer-dynamic" rustc flag. The built libstd*.so for the target will of course need to be copied into the library path in order for the executable to run, but file sizes will be considerably smaller per executable. For example, using my current nightly rustc, a simple release build of the default "Hello World" binary is 2,402,248 bytes, whereas a build with a dynamically linked libstd is merely 16,984 bytes. Dynamic linking of course means that libraries like libstd could be pushed to the satellite once (preferably on the ground). Then, subsequent executables would require less time to push as they'd have less code. The libstd is very specific to the Rust version used however, so some system for updating the libstd version would also probably be required. C executables are linked dynamically to libc by default which is why they are smaller than Rust executables in the default configuration.
@mikkelens
@mikkelens 7 ай бұрын
I assume this is a bit different nowadays? You might still have to do some work to make your rust binary comparable to a C executable, but it doesn't sound nearly as bad as you described it here
Остановили аттракцион из-за дочки!
00:42
Victoria Portfolio
Рет қаралды 3,7 МЛН
Spongebob ate Patrick 😱 #meme #spongebob #gmod
00:15
Mr. LoLo
Рет қаралды 17 МЛН
RustConf 2023 - How Powerful is Const
22:58
Rust
Рет қаралды 15 М.
RustConf 2023 - Rewrite it in Objective-C?
17:41
Rust
Рет қаралды 1,1 М.
Calling Rust code from Python
8:23
Let's Get Rusty
Рет қаралды 39 М.
RustConf 2023 - The Art and Science of Teaching Rust
28:01