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

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.

主站蜘蛛池模板: 深州市| 虞城县| 龙山县| 津南区| 邮箱| 宝鸡市| 唐河县| 无锡市| 江达县| 克拉玛依市| 买车| 汤原县| 雷州市| 无棣县| 凌云县| 莲花县| 五大连池市| 临沭县| 咸丰县| 枝江市| 克什克腾旗| 嘉定区| 临夏市| 永泰县| 佛学| 贵港市| 邢台县| 南溪县| 台前县| 拉孜县| 磴口县| 友谊县| 龙游县| 确山县| 宁乡县| 新乡县| 云霄县| 禄劝| 洪洞县| 塘沽区| 乌苏市|