【Rust日报】2022-07-11 嵌入式 Rust 学习

嵌入式 Rust 学习

这是一个嵌入式入门教学视频, 不需要任何硬件或复杂的设置. 在这个视频中,作者展示了如何通过 ARM Cortex M0+ 系列处理器 来学习嵌入式 Rust.

油管视频:https://www.youtube.com/watch?v=_sYnzFe9A6E

This Month in Rust OSDev: 六月份

“This Month in Rust OSDev” 会定期概述Rust操作系统开发生态系统的显著变化, 六月份涉及的项目如下:

  • linked-list-allocator

  • multiboot2

  • uefi-rs

  • bootloader

  • x86_64

  • cargo-xbuild

  • google/gpt-disk-rs

  • vinc/moros

  • phil-opp/blog_os

原文链接:https://rust-osdev.com/this-month/2022-06/

lyon: 1.0 版本发布

lyon 提供了许多与矢量图形相关的功能,并使用 polygon tessellation 来渲染它们, 目前正式发布 1.0 版本.

同时, 1.0 也增加了一些新的功能,下面为一个新特性的示例:

const STROKE_WIDTH: usize = 0;// A custom vertex constructor for collecting the output of the stroke tessellator.struct VariableWidthStrokeCtor;impl StrokeVertexConstructor<[f32; 2]> for VariableWidthStrokeCtor {    fn new_vertex(&mut self, mut vertex: StrokeVertex) -> [f32; 2] {        // Grab the width. The tessellator automatically (and lazily) did the work of
        // interpolating the custom attributes
        let width = vertex.interpolated_attributes()[STROKE_WIDTH];        // Instead of using `vertex.position()` compute the adjusted position manually.
        let position = vertex.position_on_path() + vertex.normal() * width * 0.5;

        position.to_array()
    }
}// Create a path with one custom attribute per endpoint.let mut builder = Path::builder_width_attributes(1);
builder.begin(point(40.0, 100.0), &[5.0]);
builder.line_to(point(80.0, 20.0), &[30.0]);
builder.cubic_bezier_to(point(100.0, 220.0), point(150.0, 50.0), point(250.0, 100.0), &[2.0]);
builder.line_to(point(200.0, 50.0), &[40.0]);
builder.end(false);let path = builder.build();let mut geometry: VertexBuffers<[f32; 2], u16> = VertexBuffers::new();
stroke_tessellator.tessellate_path(
    &path,
    &StrokeOptions::tolerance(0.01).with_line_caps(LineCap::Round),
    &mut BuffersBuilder::new(
        &mut geometry,
        VariableWidthStrokeCtor,
    ),
);

渲染的图形如下:

f0da00e00ad9b31fc6691ab952a15f28.png

原文链接:https://nical.github.io/posts/lyon-1-0.html

fe2o3-amqp: AMQP 1.0的 Rust 版本实现

fe2o3-amqp 是一个基于 serde 和 tokio 的AMQP 1.0协议的一个完整实现。

github 地址:https://github.com/minghuaw/fe2o3-amqp

axum web 框架

这是一个油管视频,介绍如何使用axum 进行 web 开发.

油管视频:https://www.youtube.com/watch?v=QtKO9f_iPhI&list=PL8lUUBadSMNB5h1KWPcyOM6WFimE4hNdv

--

From 日报小组 BobQin,FBI小白

社区学习交流平台订阅:

  • Rustcc论坛: 支持rss

  • 微信公众号:Rust语言中文社区

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值