Chromium正式开始支持Rust

电子说

1.2w人已加入

描述

 

Chromium 正式开始支持 Rust

目前的支持只是第一阶段,在C++代码中使用Rust写的第三方库(编译成.so)。估计明年Chromium的二进制发行文件中会包含rust写的库。 更广泛地在Chromium中使用Rust还需要时间去评估。 https://security.googleblog.com/2023/01/supporting-use-of-rust-in-chromium.html

教程:将C++代码移植到Rust之体验

非常生动和详尽的教程:怎么做,过程体验如何。 https://fasterthanli.me/series/advent-of-code-2022/part-18

leptos 发布 v0.1 版本

leptos 定位其实与 Yew, Seed 等类似,是Web前端框架。代码看起来是这个样子:

	use leptos::*; #[component] pub fn SimpleCounter(cx: Scope, initial_value: i32) -> impl IntoView { // create a reactive signal with the initial value let (value, set_value) = create_signal(cx, initial_value); // create event handlers for our buttons // note that `value` and `set_value` are `Copy`, so it's super easy to move them into closures let clear = move |_| set_value(0); let decrement = move |_| set_value.update(|value| *value -= 1); let increment = move |_| set_value.update(|value| *value += 1); // create user interfaces with the declarative `view!` macro view! { cx, 
"Value: " {move || value().to_string()} "!"
} } // Easy to use with Trunk (trunkrs.dev) or with a simple wasm-bindgen setup pub fn main() { mount_to_body(|cx| view! { cx, 3 /> }) } Rust在Web前端的基础设施越来越丰富了,主要是乘了WebAssembly的东风了。 https://github.com/leptos-rs/leptos

veryl - 一个现代的硬件描述语言

大家知道Verilog / VHDL吧,用于描述硬件数字电路的逻辑的。这个也类似,不过更现代。项目还在早期,感兴趣的可以参与。 https://github.com/dalance/veryl

打开APP阅读更多精彩内容
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

全部0条评论

快来发表一下你的评论吧 !

×
20
完善资料,
赚取积分