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

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.

主站蜘蛛池模板: 祁阳县| 三亚市| 左权县| 东平县| 通州市| 城固县| 泰宁县| 宁波市| 宣威市| 临清市| 牡丹江市| 泉州市| 内江市| 兴业县| 汶川县| 屯门区| 五河县| 镇巴县| 贺兰县| 克山县| 日照市| 吴堡县| 晋州市| 绵竹市| 武平县| 宁陵县| 辽阳市| 陆川县| 炉霍县| 都江堰市| 瑞安市| 商城县| 清丰县| 平潭县| 泸定县| 南澳县| 泰宁县| 碌曲县| 红桥区| 新巴尔虎右旗| 肃宁县|