这是一个按这本书
实现的图形渲染库。看下效果
Read More
pbrt
使用 diesel-factories。这个库参考 Ruby 的 factory_bot 设计。可以对应像下面这样写:
Ruby factory :country do name "Denmark" code "DK" end factory :city do name "Copenhagen" country end Rust #[derive(Clone, Factory)] #[factory(model = "Country", table = "countries")] struct CountryFactory { pub name: String, pub code: String, } #[derive(Clone, Factory)] #[factory(model = "City", table = "cities")] struct CityFactory<'a> { pub name: String, pub country: Association<'a, Country, CountryFactory>, }
Read More
vxWorks 是大名鼎鼎的实时操作系统,在嵌入式设备和工业上大面积使用。现在有个pr要在 Rust 编译中加入对 vxWorks 的支持。
Read More
讲安全,讲历史,讲Rust。
Read More
使用这个库,用 Rust 对 GPU 编程就非常方便了,这个库提供了一些宏,使得 GPU 编程也能充分利用 Rust 的生态。看下代码长啥样:
// The "emu!" macro accepts a chunk of Emu code and // generates Rust functions that can be called to perform computation on the GPU emu! { // Multiply any element in given data by given coefficient // Data and coefficient must be floats function multiply(data [f32], coeff f32) { data[..] *= coeff; } // Apply sigmoid function to any element in given data // Data must be floats function sig(data [f32]) { let elem: f32 = data[..]; let res: f32 = 1 / (1 + pow(E, -elem)); data[..] = res; } /// Multiplies each element in given data by given coefficient pub fn multiply(data: &mut Vec<f32>, coeff: &f32); /// Applies sigmoid to each element in given data pub fn sig(data: &mut Vec<f32>); }
Read More
Iterator 页面据说会从 14.4MB 缩减到 724kB :D
Read More
今天这个库发布了 v0.7。来看一下性能:
另外还有一个库叫 librsvg,目前也已经用 Rust 重写了。这是各大 Linux 发行版中很基础的一个库,与resvg 比,两者性能上目前各有千秋。
Read More
讲得很清晰,想听听现场录音。