ITPub博客

首页 > 数据库 > 数据库开发技术 > 【Rust日报】2020-02-06 那些在生产中使用 Rust 的公司

【Rust日报】2020-02-06 那些在生产中使用 Rust 的公司

原创 数据库开发技术 作者:Rust语言中文社区 时间:2020-02-07 18:26:59 0 删除 编辑

那些在生产中使用 Rust 的公司

按行业组织的,在生产中使用 Rust 的公司的精选列表。可供大家参考,GitHub 地址:https://github.com/omarabid/rust-companies

reddit 上参与讨论:https://www.reddit.com/r/rust/comments/ez7m4u/rust_companies_in_production_list_feel_free_to/

Async Diesel

这个仓库简洁、有效地将 Diesel 集成到 async-std 中,如果你用 Rust 构建后端程序的时候想使用数据库连接池,可以考虑这种方式。

使用示例:

  
#[macro_use]
extern crate diesel;

use async_diesel::*;
use diesel::{
prelude::*,
r2d2::{ConnectionManager, Pool},
};
use std::error::Error;
use uuid::Uuid;

// Schema
table! {
users (id) {
id -> Uuid,
}
}

#[async_std::main]
async fn main() -> Result<(), Box<dyn Error>> {
// Connect
let manager =
ConnectionManager::<PgConnection>::new("postgres://postgres@localhost/async_diesel__test");
let pool = Pool::builder().build(manager)?;

// Add
println!("add a user");
diesel::insert_into(users::table)
.values(users::id.eq(Uuid::new_v4()))
.execute_async(&pool)
.await?;

// Count
let num_users: i64 = users::table.count().get_result_async(&pool).await?;
println!("now there are {:?} users", num_users);

Ok(())
}

项目地址:https://github.com/mehcode/async-diesel

Strings in Rust and WebAssembly

如标题所说,我们将讨论 WebAssembly(Wasm)中的 String,说明 Rust 的 String 是如何运作的。并且使用 Wasm-pack 来构建 HelloWorld 程序。原文地址:https://medium.com/wasm/strings-in-webassembly-wasm-57a05c1ea333

reddit 上参与讨论:https://www.reddit.com/r/rust/comments/ezbebl/strings_in_rust_and_webassembly/

Cross Compiling Rust for the Raspberry Pi

This guide covers how to set up your linux computer to compile, upload, and run a Rust binary on your Raspberry Pi.

read more:https://chacin.dev/blog/cross-compiling-rust-for-the-raspberry-pi/


From 日报小组 @Jancd


原文作者:Rust语言中文社区;如有侵权,请联系管理员删除。

请登录后发表评论 登录
全部评论

注册时间:2020-06-11

  • 博文量
    1769
  • 访问量
    718639