Ruma is dead, long live Ruma! April 10, 2020作者:Jonas Platte
Ruma是一组由Matrix homeserver服务器,客户端和支持库组成的由Rust语言开发的软件组。Matrix是一个开放的在线通讯协议。关于这个项目的基本情况可以访问 项目主页。今天有点伤感的宣布:
https://paytonturnage.gitbook.io/valora/https://github.com/turnage/valora
Valora是一个能作画的画笔,写的可视化构建可以:
大家可以试试下面的教程:
cargo new art --bin && cd art
cargo install cargo-edit && cargo add valora
然后在main.rs
里面加入下面的代码:
use valora::prelude::*;
fn main() -> Result<()> {
run_fn(Options::from_args(), |_gpu, world, _rng| {
Ok(move |ctx: Context, canvas: &mut Canvas| {
canvas.set_color(LinSrgb::new(1., 1., 1.));
canvas.paint(Filled(ctx.world));
let max_radius = world.width / 3.;
let radius = ctx.time.as_secs_f32().cos().abs() * max_radius;
canvas.set_color(LinSrgb::new(1., 0., 0.));
canvas.paint(Filled(Ellipse::circle(world.center(), radius)));
})
})
}
运行就可以看到计算机创作的精美图案了:
cargo run --release
大家试一试!第一次编译的时候需要的时间稍微长点,当valora开始运行的时候, 你就可以看到一个不断变化大小的红圈!
Flutter RS
- 开发桌面版Flutter App
(用Rust
做后端) 已经发布在stable branch
上了。https://github.com/flutter-rs/flutter-rs
用rust和Flutter开发桌面版应用。
需要安装的软件:
开发步骤:
cargo install cargo-flutter
git clone https://github.com/flutter-rs/flutter-app-template
cd flutter-app-template
cargo flutter run
发布:
最后要发布应用程序,只需运行:cargo flutter --format appimage build --release
Rust
语言里通过OpenSSH
的Wrapping
脚本化实现SSH
调用https://github.com/jonhoo/openssh-rs/
mathbench
测量编译时间https://bitshifter.github.io/2020/04/12/mathbench-build-timings/