当前位置:网站首页>Rust language - cargo, crates io
Rust language - cargo, crates io
2022-07-01 18:17:00 【A pig】
release profile:
It's predefined
Customizable : Different configurations can be used , Have more control over code compilation
Every profile The configuration of is independent of others profile
cargo Two main profile:
—dev profile: For development cargo build
—release profile: Apply to Publishing cargo build --release
# Generally, the following settings are made
[profile.dev]
opt-level = 0
[profile.release]
opt-level = 3Release crate To crates.io
Use cargo doc --open The order can change crate Upload to crates.io Website and open this website
///: Documentation Comments
//!: A note describing the outer entry
pub use Export easy-to-use public API
For example, if you call a deep structure parameter
use xzc::x::z::c It's troublesome for users
We can do it in lib.rs Use in
pub use self::xzc::x::z::c
In this way, we want to import c Can be directly in main.rs Use in
use xzc::c
from crates.io Install binary crate
command :cargo install ***
边栏推荐
- Product service, operation characteristics
- The reviewboard has 500 errors when submitting a review. Solutions
- Subnet division and summary
- Review Net 20th anniversary development and 51aspx growth
- Zabbix报警执行远程命令
- Penetration practice vulnhub range Nemesis
- 股票万1免5证券开户是合理安全的吗,怎么讲
- Gameframework eating guide
- SQL injection vulnerability (MySQL and MSSQL features)
- DRF --- response rewrite
猜你喜欢

Mujoco model learning record

Mujoco's biped robot Darwin model

Yolov5 practice: teach object detection by hand

Countdownlatch blocking wait for multithreading concurrency

Fresh, 2022 advanced Android interview must know 100 questions (interview questions + answer analysis)

How to write good code - Defensive Programming Guide

Euler function: find the number of numbers less than or equal to N and coprime with n

The difference and relationship between iteratible objects, iterators and generators
![Htt [ripro network disk link detection plug-in] currently supports four common network disks](/img/e4/c06b94243cdbe391b8b2124ff30789.jpg)
Htt [ripro network disk link detection plug-in] currently supports four common network disks

Explain in detail the process of realizing Chinese text classification by CNN
随机推荐
This is the latest opportunity of the London bank trend
js如何将带有分割符的字符串转化成一个n维数组
Yuancosmos game farmersworld farmers world - core content of the second conference in China!
Depth first traversal and breadth first traversal [easy to understand]
On the language internationalization of Yongzhong Office
Is Huishang futures a regular futures platform? Is it safe to open an account in Huishang futures?
Detailed explanation of select in golang
Equipment simulation and deduction training system software
Quick foundation of group theory (5): generators, Kelley graphs, orbits, cyclic graphs, and "dimensions" of groups?
The method of real-time tracking the current price of London Silver
Irradiance, Joule energy, exercise habits
Is it safe to open a stock account by mobile phone? What do you need to bring with you to open an account?
股票万1免5证券开户是合理安全的吗,怎么讲
At present, where is the most formal and safe account opening for futures speculation? How to open a futures account?
Alibaba cloud Li Feifei: China's cloud database has taken the lead in many mainstream technological innovations abroad
Mujoco XML modeling
Bug of QQ browser article comment: the commentator is wrong
[beauty detection artifact] come on, please show your unique skill (is this beauty worthy of the audience?)
Work and leisure suggestions of old programmers
Basic usage of shell script