[Rust Daily] 2023-10-03 Rust std’s support for UEFI enters the Nightly version

Rust std's support for UEFI enters the Nightly version

In the article, Ayush Singh shared his experience of starting to develop Rust Std for UEFI under Tianocore during the Google Summer of Code 2022 project. After a year of work, initial support for UEFI Rust std has been merged into Rust Nightly. In the article, Ayush reviews what can be done now and his plans.

UEFI(统一的可扩展固件接口)是一个软件程序的规范,它连接计算机的固件到其操作系统。尽管 UEFI 提供了许多 OS 原语,如分配器、stdio、网络等,并且可以在 UEFI 中运行相当复杂的应用程序,如内存检查、磁盘检查等,但在这个领域的工作主要是使用C语言完成的。

Ayush mentioned that while it's possible to write UEFI applications using basic C, you'll need to use a library like EDKII to get beyond Hello World.

GNU-EFI, on the other hand, is a set of libraries and header files for compiling UEFI applications using the system's native GCC. Therefore, having Rust std support will make it possible to write complex UEFI applications and utilities using standard Rust primitives. Since rustc allows cross-compilation, writing UEFI applications in Rust is as  *-unknown-uefisimple as creating a cargo project and compiling it to the target.

Currently implemented Rust Std features include:

  • alloc: This means all heap types should work.

  • os_str: OsStringUses UTF-16 and UCS-2 under the hood, allowing more direct conversion to Rust UTF-8 strings.

  • os::uefi Some UEFI specific features are provided below.

Ayush also showed how to create a small "Hello World" application using the standard library and shared his future plans and work.

Original link https://programmershideaway.xyz/post29/

Rust project build configuration guide

Nicholas rewrote the build configuration chapter of the Rust Performance Book. This section now provides a more comprehensive guide showing how to change the performance of a Rust program without changing the source code. Including various aspects such as running speed, memory usage, binary size and compilation time.

Nicholas mentioned that through simple changes, the performance of Rust programs can be greatly improved, and encouraged everyone to try these methods.

Original post link https://mas.to/@nnethercote/111168277901302034

performance book build configuration chapter https://nnethercote.github.io/perf-book/build-configuration.html

ring releases version 0.17.0

ring is a cryptographic library focused on implementing, testing, and optimizing a core set of cryptographic operations exposed through an easy-to-use API. It is written in a mix of Rust, C, and assembly language and provides a Rust API (the C and assembly language code is mostly derived from BoringSSL).

Recently, it released version 0.17.0, which is a new milestone.

Since the ring library is used by rustls, a Rust implementation of TLS, this update is considered important. Because ring previously only supported x86 and ARM architectures, and rustls could only support those architectures (even though it was a very high-quality TLS implementation), ring prevented other crates in the Rust ecosystem from using it by default. At present, ring has added support for PowerPC, S390X, RISC-V and other architectures, so its applications will be more extensive.

Warehouse address https://github.com/briansmith/ring

-- From Daily Team RustPlumber

Community learning exchange platform subscription:

  • Rust.cc Forum: support rss

  • WeChat public account: Rust language Chinese community

Guess you like

Origin blog.csdn.net/u012067469/article/details/133564802