這是一個按這本書編程
實現的圖形渲染庫。看下效果安全
Read More
pbrtapp
使用 diesel-factories。這個庫參考 Ruby 的 factory_bot 設計。能夠對應像下面這樣寫:ide
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 Moresvg
vxWorks 是大名鼎鼎的實時操做系統,在嵌入式設備和工業上大面積使用。如今有個pr要在 Rust 編譯中加入對 vxWorks 的支持。性能
Read More測試
講安全,講歷史,講Rust。spa
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
講得很清晰,想聽聽現場錄音。