tower 是一个为构建 健壮的网络客户端和服务器提供模块化和可重用组件的库。它提供了一个简单的核心抽象,即 Service trait,它表示一个异步函数,接受一个请求并返回一个响应或错误.
原文链接: https://blog.frankel.ch/introduction-tower/
在最近的版本中,serde 开始将 serde_derive 作为预编译二进制文件进行分发。这引起了一些开发人员的反对,他们担心这会带来安全风险。一些开发人员还要求将预编译二进制文件作为可选项,而不是默认提供.
最终, serde 在 v1.0.184 版本中去掉了预编译的二进制文件.
serde v1.0.184 release
Rust devs push back as Serde project ships precompiled binaries
zfi 是一个 用于编写 UEFI 应用程序的 Rust crate,具有以下目标:
ZFI 仅支持单线程环境,这与 UEFI 规范相同。
#![no_std]
#![no_main]
use alloc::boxed::Box;
use zfi::{pause, println, DebugFile, Image, Status, SystemTable};
extern crate alloc;
#[no_mangle]
extern "efiapi" fn efi_main(image: &'static Image, st: &'static SystemTable) -> Status {
// This is the only place you need to use unsafe. This must be done immediately after landing
// here.
unsafe {
zfi::init(
image,
st,
Some(|| Box::new(DebugFile::next_to_image("log").unwrap())),
)
};
// Any EFI_HANDLE will be represents by a reference to a Rust type (e.g. image here is a type of
// Image). Each type that represents EFI_HANDLE provides the methods to access any protocols it
// is capable for (e.g. you can do image.proto() here to get an EFI_LOADED_IMAGE_PROTOCOL from
// it). You can download the UEFI specifications for free here: https://uefi.org/specifications
println!("Hello, world!");
pause();
Status::SUCCESS
}
#[cfg(not(test))]
#[panic_handler]
fn panic_handler(info: &core::panic::PanicInfo) -> ! {
zfi::eprintln!("{info}");
loop {}
}
#[cfg(not(test))]
#[global_allocator]
static ALLOCATOR: zfi::PoolAllocator = zfi:PoolAllocator;
github地址: https://github.com/ultimicro/zfi
这是一个油管视频,介绍了如何使用 axum 框架来构建一个内存实现的 Todo 应用, 他包含以下内容:
油管视频: https://www.youtube.com/watch?v=uSmURlg2A9Y