【Rust日報】 2019-05-11:wasm-flate 使用WASM對客戶端文件進行超快壓縮的

「社區討論」命名異步函數的返回類型

該貼的做者認爲,在async趨於穩定以前,還有個重要的討論,就是支持異步函數的返回類型的自定義命名。app

async fn foo() -> impl Future<Output = usize> + Send { /**/ }
// or even to make the return type nameable
type FooReturn = impl Future<Output = usize> + Send;
async fn foo() -> FooReturn { /**/ }

Read moreless

replace-await

一個替換舊版 await! 宏實做改爲新版await 語法的工做異步

Read moreasync

Cargo 權限控制

為每個庫增長權限控管。ide

有了這些權限,我們能夠回答這些問題:函數

  • 為什麼png庫使用網絡層?工具

  • 為什麼http庫使用文件系統層?學習

Read morespa

「嵌入式Rust」μAMP: 微處理器上的非對稱多處理庫

在嵌入式系統AMP systems上的一個 frameworkcode

能夠寫各種原生的嵌入式程式

Read more

Rust Wasm工做組發佈:wasm-tracing-allocator

一個全局的分配器追踨器,能夠追到wasm內存分配的情況

wasm-tracing-allocator

rust-hypervisor-firmware: 一個簡單的 kvm firmware

intel出品,代碼很少,看上去確實簡單,能夠學習如何用rust實現一個kvm。

  • Read more

  • intel/rust-hypervisor-firmware

另外一種 ray tracing 實現

Read more

wasm-flate: 使用WASM對客戶端文件進行超快壓縮的工具

支持GZIP,ZLIB和DEFLATE壓縮和解壓縮

wasm-flate

context-attribute: 使用文檔註釋設置錯誤上下文

/// Square a number if it's less than 10.
#[context]
fn square(num: usize) -> Result<usize, failure::Error> {
   ensure!(num < 10, "Number was too large");
   Ok(num * num)
}

輸出

$ cargo run --example square 12
Error: ErrorMessage { msg: "Number was too large" }
Square a number if it's less than 10.

context-attribute

相關文章
相關標籤/搜索