You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: esp-mbedtls-sys/README.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,15 +18,19 @@
18
18
19
19
## Precompilation
20
20
21
-
For user-convenience, the MbedTLS C library also comes pre-compiled for the following Rust targets:
21
+
For user-convenience, the MbedTLS C library also comes pre-built for the following Rust targets:
22
22
-`rsicv32imc-unknown-none-elf`
23
23
-`rsicv32imac-unknown-none-elf`
24
24
-`xtensa-esp32-none-elf`
25
25
-`xtensa-esp32s2-none-elf`
26
26
-`xtensa-esp32s3-none-elf`
27
27
- (PRs for other Rust baremetal targets appreciated!)
28
28
29
-
For other MCU baremetal targets as well as for STD platforms, the MbedTLS C library will be compiled on the fly, but that requires GCC (the cross-compiler flavor for your MCU) and Clang pre-installed.
29
+
For other MCU baremetal targets as well as for STD platforms, the MbedTLS C library will be compiled on the fly with `clang` (by default), or with GCC (if the `use-gcc` feature is enabled).
30
+
31
+
Note that for the latter, you DO need to have the GCC cross-compiler flavor for your MCU pre-installed and on your $PATH, while with `clang`_ANY_`clang` instance would do, as `clang` is natively a cross-compiler. `clang` is anyway always necessary during on-the-fly compilation for the Rust bindings' generation, so that's why it is used by default for compiling the MbedTLS C library as well.
32
+
33
+
The on-the-fly compilation process also needs `cmake` and `ninja` pre-installed (for now).
30
34
31
35
ESP-IDF is also supported and in that case `esp-mbedtls-sys` becomes just an alias for `esp-idf-sys` and uses the MbedTLS library which is built-in inside ESP-IDF.
Copy file name to clipboardExpand all lines: esp-mbedtls-sys/gen/builder.rs
+42-9Lines changed: 42 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@ impl MbedtlsBuilder {
34
34
///
35
35
/// Arguments:
36
36
/// - `hooks` - Set of algorithm hooks to enable
37
+
/// - `force_clang`: If true, force the use of Clang as the C/C++ compiler
37
38
/// - `crate_root_path`: Path to the root of the crate
38
39
/// - `cmake_rust_target`: Optional target for CMake when building MbedTLS, with Rust target-triple syntax. If not specified, the "TARGET" env variable will be used
39
40
/// - `cmake_host_rust_target`: Optional host target for the build
/// - `force_clang`: If true, force the use of Clang as the C/C++ compiler
305
309
/// - `project_path`: Path to the root of the CMake project
306
310
/// - `cmake_rust_target`: Optional target for CMake when building MbedTLS, with Rust target-triple syntax. If not specified, the "TARGET" env variable will be used
307
311
/// - `cmake_host_rust_target`: Optional host target for the build
308
-
/// - `force_esp_riscv_toolchain`: If true, and if the target is a riscv32 target, force the use of the Espressif RISCV GCC toolchain
312
+
/// - `force_esp_riscv_gcc`: If true, and if the target is a riscv32 target, force the use of the Espressif RISCV GCC toolchain
309
313
/// (`riscv32-esp-elf-gcc`) rather than the derived `riscv32-unknown-elf-gcc` toolchain which is the "official" RISC-V one
0 commit comments