同步操作将从 百度开源/incubator-Teaclave 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
This doc defines some guidelines for developing the MesaTEE project in Rust.
We use rustfmt
and clippy
to format and lint all Rust code. Mostly, we use
the default configurations, but there are a couple of custom settings and lint
exceptions. Our CI will check the format/lint issues and deny all warnings by
default. Simply run make format
to format all code before submitting a PR. If
you still have some doubts of the clippy
error, feel free to point out and add
an exception.
Using unsafe Rust is extremely dangerous, and may break Rust's strong memory-safety guarantees. Therefore, we want to keep unsafe Rust as minimal as possible. Sometime (very rare) using unsafe Rust can significant improve performance, the unsafe code should well documented and explain the rationales. For contributors and reviewers, pay attention to the unsafe code and carefully check whether the pre-conditions and post-conditions are still hold.
We have designed a simple and easy error handling mechanism in MesaTEE Core. It
can help to easyly convert different error types to mesatee_core::Error
, and
can also preserve error semantics.
Using unwrap
to get a value from an optional type may introduce runtime panic.
Therefore, properly using the error handling mechanism provided by Rust can make
the system robust and clean. In some cases, optional value can never be None
internally, unwrap
can be used with a comment explaining the assumptions and
reasons. The same rule also applies to panic
and similar functions which may
cause runtime panic.
To ensure the quality, stability and compatibility of upstream crates, all
third-party crates (especially for ported SGX-compatible crates) used in MesaTEE
are vendored in the third_party
directory. Please refer to the crates-sgx
repo and choose specific versions of vendored crates.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。