|
1 | | -//! Raw bindings to the MbedTLS library |
| 1 | +//! Raw bindings to the MbedTLS library. |
| 2 | +//! |
| 3 | +//! # External dependencies |
| 4 | +//! |
| 5 | +//! MbedTLS depends on the following functions from the C standard library: |
| 6 | +//! |
| 7 | +//! - `calloc` |
| 8 | +//! - `free` |
| 9 | +//! - `memchr` |
| 10 | +//! - `memcmp` |
| 11 | +//! - `memcpy` |
| 12 | +//! - `memmove` |
| 13 | +//! - `memset` |
| 14 | +//! - `printf` |
| 15 | +//! - `putchar` |
| 16 | +//! - `puts` |
| 17 | +//! - `rand` |
| 18 | +//! - `snprintf` |
| 19 | +//! - `strchr` |
| 20 | +//! - `strcmp` |
| 21 | +//! - `strlen` |
| 22 | +//! - `strncmp` |
| 23 | +//! - `strncpy` |
| 24 | +//! - `strstr` |
| 25 | +//! - `vsnprintf` |
| 26 | +//! |
| 27 | +//! This crate does not provide implementations of these functions. It's up to |
| 28 | +//! the consumer to ensure that they are available at link time. On most |
| 29 | +//! platforms, these functions are provided by the host environment's libc |
| 30 | +//! implementation, so no additional work is needed. |
| 31 | +//! On embedded platforms, you may need to link a suitable libc implementation |
| 32 | +//! like [tinyrlibc](https://github.com/rust-embedded-community/tinyrlibc). |
| 33 | +//! |
| 34 | +//! Note that depending on what features of MbedTLS you use, you won't need |
| 35 | +//! all of these functions. The list represents the full set of functions that |
| 36 | +//! MbedTLS may call. |
| 37 | +//! The linker error messages will indicate which specific functions are |
| 38 | +//! missing, so you can focus on providing those first. |
| 39 | +//! |
| 40 | +//! Additionally, the following list of MbedTLS functions are left |
| 41 | +//! unimplemented in this crate: |
| 42 | +//! |
| 43 | +//! - `mbedtls_platform_zeroize` |
| 44 | +//! - `mbedtls_psa_external_get_random` |
| 45 | +//! |
| 46 | +//! These functions are provided by `mbedtls-rs`. If you're building C code |
| 47 | +//! that depends on MbedTLS, make sure to link against `mbedtls-rs` to get |
| 48 | +//! these implementations. |
2 | 49 |
|
3 | 50 | #![no_std] |
4 | 51 | #![allow(clippy::uninlined_format_args)] |
| 52 | +#![allow( |
| 53 | + rustdoc::bare_urls, |
| 54 | + rustdoc::broken_intra_doc_links, |
| 55 | + rustdoc::invalid_html_tags, |
| 56 | + rustdoc::invalid_rust_codeblocks, |
| 57 | + reason = "Documentation is generated from the C header files" |
| 58 | +)] |
5 | 59 | #![allow(unknown_lints)] |
6 | 60 |
|
7 | 61 | pub use bindings::*; |
|
0 commit comments