< 返回版块

Mike Tang 发表于 2019-09-11 23:39

Tags:rust

2019 年 Javascript 程序员最想学的语言有哪些?

根据 StackOverflow 上的数据进行统计。结果如下:

Rust    11.9%
WebAssembly    12.3%
TypeScript     35.8%
None of above    40%

Read More: https://www.techrepublic.com/article/the-rising-programming-languages-that-javascript-developers-are-learning-in-2019/

futures-intrusive - 为基于 async/await 和 Future 的异步生态提供了一些 intrusive 集合同步原语

又是个新名词,查了一下,侵入式集合是这样一个东西:

In the words of the intrusive-collections crate : The main difference between an intrusive collection and a normal one is that while normal collections allocate memory behind your back to keep track of a set of values, intrusive collections never allocate memory themselves and instead keep track of a set of objects.

这个库提供的原语有下面这些:

  • Channels in a variety of flavors:
    • Oneshot
    • Multi-Producer Multi-Consumer (MPMC)
    • State Broadcast
  • Synchronization Primitives:
    • Manual Reset Event
    • Mutex
    • Semaphore
  • A timer

Repo: https://github.com/Matthias247/futures-intrusive

ESP32 上的 Rust

作者还是个大学生,折腾了不少嵌入式方面的东西,最近用 rustc 为他自己做了一块智能手表。现在把他在 ESP32 上折腾 Rust 的经历和经验记录下来。

Read More: https://mabez.dev/blog/posts/esp32-rust/

multiversion - 可以为同一个函数针对不同的平台或条件,指定不同的版本

看一下效果

use multiversion::multiversion;

multiversion!{
    fn square(x: &mut [f32])
    "[x86|x86_64]+avx" => square_avx,
    "x86+sse" => square_sse,
    default => square_generic,
}

#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
#[target_feature(enable = "avx")]
unsafe fn square_avx(x: &mut [f32]) {
    for v in x {
        *v *= *v;
    }
}

#[cfg(target_arch = "x86")]
#[target_feature(enable = "sse")]
unsafe fn square_sse(x: &mut [f32]) {
    for v in x {
        *v *= *v;
    }
}

fn square_generic(x: &mut [f32]) {
    for v in x {
        *v *= *v;
    }
}

不得不指出,Rust 强大的 4 种宏,可以玩出远远超越之前 C/C++ 宏的效果,发挥想象吧。

Repo: https://github.com/calebzulawski/multiversion

Cloud Hypervisor - Intel 旗下的虚拟机监视器

发布 0.2 版了。

Cloud Hypervisor is an open source Virtual Machine Monitor (VMM) that runs on top of KVM. The project focuses on exclusively running modern, cloud workloads, on top of a limited set of hardware architectures and platforms.

Repo: https://github.com/intel/cloud-hypervisor

另外还有一个姐妹项目:rust-hypervisor-firmware

它是一个 KVM 的固件。

目前,它们都还处于实验性的阶段。

vxdraw - 基于 gfx-hal 的快速 2D 渲染库

vxdraw is a rendering library for drawing sprites, text, and streaming textures to a window. It is not an engine, just a library, and has no runtime.

它的特点是为动画优化,能充分利用 GPU 的渲染。

Repo: https://github.com/Omen-of-Aecio/vxdraw

Veloren - 一个多从砖块 RPG 游戏

Veloren is a multiplayer voxel RPG written in Rust. It is inspired by games such as Cube World, Legend of Zelda: Breath of the Wild, Dwarf Fortress and Minecraft.

哇,看到好多熟悉的名字。

img

感觉自己心动了。

Repo: https://veloren.net/

VeoLuz - 光与影,万花筒艺术创作工具

一个字,美!酷!

img img img img img

Website: https://jaredforsyth.com/veoluz/


From 日报小组 Mike

日报订阅地址:

独立日报订阅地址:

社区学习交流平台订阅:

评论区

写评论

还没有评论

1 共 0 条评论, 1 页