博客
关于我
【Rust日报】 2020-08-20 Chrome 的 Rust 与 C++ 的互操作性
阅读量:691 次
发布时间:2019-03-17

本文共 1496 字,大约阅读时间需要 4 分钟。

Chrome 的 Rust 与 C++ 的互操作性

这是 www.chromium.org 上关于 chromium 内存安全的一篇博文,Chrome 工程师正在尝试 Rust。在可预见的将来,C++ 仍然在代码库中占据主导地位,所以如果任何地方使用 Rust,都需要考虑与 C++ 相适应。这似乎提出了一些 C++/Rust 互操作性的挑战,而在这之前其他人都没有遇到过。

更多详情请看:https://www.chromium.org/Home/chromium-security/memory-safety/rust-and-c-interoperability

Rust on Arduino Uno

这是作者使用 Rust 在 Arduino 上实践的系列博文的第一篇,如何在 Arduino Uno 上点亮小灯????。在撰写本文时,大约一个月前,avr-rust 分支被合并了(https://github.com/rust-lang/rust/issues/44052)。这意味着现在可以通过仅运行cargo + nightly 构建,为目标(avr-unknown-unknown)提供一个 .cargo/config.toml 来为 avr 微控制器板编译 Rust 程序。

更多请看原文:https://creativcoder.dev/rust-on-arduino-uno

Async 项目比较

Rust 的将异步代码引入语言的方法比较新颖,它没有将异步系统与语言打包在一起,例如 Golang 提供的内置 goroutine 的方法,而是提供了一个接口,供独立的库开发人员使用以实现异步给定进程的运行时。所以博文对 Futures、Tokio、async-std、smol、Actix、embrio、Bastion 这些 async 生态的库做了个总结,更多请看原文:https://runrust.miraheze.org/wiki/Async_crate_comparison#Comparison_of_Async_Ecosystems

Gfx-rs

gfx-rs 是 Rust 实现的低级,跨平台图形和计算抽象库,gfx-rs 社区的目标是使 Rust 中的图形编程变得容易,快速和可靠。项目地址:https://github.com/gfx-rs/gfx

async-rwlock

stjepang 的新轮子 async-rwlock(https://github.com/stjepang/async-rwlock),异步读写锁。这种类型的锁允许在任何时间点上有多个读取器或一个写入器。

示例:

use async_rwlock::RwLock;let lock = RwLock::new(5);// Multiple read locks can be held at a time.let r1 = lock.read().await;let r2 = lock.read().await;assert_eq!(*r1, 5);assert_eq!(*r2, 5);drop((r1, r2));// Only one write lock can be held at a time.let mut w = lock.write().await;*w += 1;assert_eq!(*w, 6);

From 日报小组 @Jancd @Downtime

社区学习交流平台订阅:

  • Rust.cc论坛: 支持rss

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

转载地址:http://ibohz.baihongyu.com/

你可能感兴趣的文章
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
NO 157 去掉禅道访问地址中的zentao
查看>>
no available service ‘default‘ found, please make sure registry config corre seata
查看>>
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
查看>>
no connection could be made because the target machine actively refused it.问题解决
查看>>
No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
查看>>
No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
查看>>
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
查看>>
No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
查看>>
No mapping found for HTTP request with URI [/logout.do] in DispatcherServlet with name 'springmvc'
查看>>
No module named 'crispy_forms'等使用pycharm开发
查看>>
No module named 'pandads'
查看>>
No module named cv2
查看>>
No module named tensorboard.main在安装tensorboardX的时候遇到的问题
查看>>
No module named ‘MySQLdb‘错误解决No module named ‘MySQLdb‘错误解决
查看>>
No new migrations found. Your system is up-to-date.
查看>>
No qualifying bean of type XXX found for dependency XXX.
查看>>
No qualifying bean of type ‘com.netflix.discovery.AbstractDiscoveryClientOptionalArgs<?>‘ available
查看>>
No resource identifier found for attribute 'srcCompat' in package的解决办法
查看>>
no session found for current thread
查看>>