官术网_书友最值得收藏!

Dynamic libraries, software distribution, and Rust

For the most part, Rust avoids using dynamic libraries. Instead, all of the dependencies of a Rust program are linked directly into the executable, and only select operating system libraries are dynamically linked. This makes Rust programs a little larger than you might expect, but a few megabytes are of no concern in the era of gigabytes. In exchange, Rust programs are very portable and immune to dynamically linked library version issues.

That means that, if a Rust program works at all, it's going to work on pretty much any computer running roughly the same operating system and architecture it was compiled for, with no hassles. You can take your release version of a Rust program, zip it up, and email it to someone else with confidence that they will have no problem running it.

This doesn't entirely eliminate external dependencies. If your program is a client, the server it connects to needs to be available, for example. However, it does greatly simplify the whole packaging and distribution process.

主站蜘蛛池模板: 女性| 元阳县| 石柱| 大理市| 教育| 响水县| 湖南省| 茌平县| 郑州市| 浏阳市| 邛崃市| 永州市| 米易县| 饶平县| 唐河县| 南漳县| 东阿县| 松阳县| 肃北| 昭苏县| 黄平县| 上犹县| 独山县| 井冈山市| 黎城县| 观塘区| 八宿县| 凤凰县| 木兰县| 格尔木市| 贡山| 漳州市| 西贡区| 天门市| 隆德县| 邳州市| 遵义县| 蓬安县| 太保市| 大庆市| 枞阳县|