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

那些在生产中使用 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&
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值