【Rust日报】 2020-02-13 在 VSCode 中调试 Rust 程序

Boa

它是用 Rust 编写的实验性 Javascript 词法分析器,解析器和编译器。

示例:

项目地址:https://github.com/jasonwilliams/boa

在 VSCode 中调试 Rust 程序

作者的这个博文基于上文提到的 Boa 项目。我们可以有多种方法调试 Boa 的操作,以此去了解它是如何工作的,甚至测试一些 javaScript 的代码。

了解具体的配置方法以及具体实现请看 博文地址:https://jason-williams.co.uk/debugging-rust-in-vscode

git-trim

git-trim 是 Rust 编写的项目,他可以自动修剪合并或消失的 git 远程跟踪分支。

仓库地址:https://github.com/foriequal0/git-trim

关于 Rust 并行编程的讨论

水友请看:https://www.reddit.com/r/rust/comments/f2uqa7/parallel_programming_in_rust/

麻辣火锅-DB

当然,标题是开玩笑的orz,实际上这个项目是 hotpot-db,它是围绕 SQLite 的 JSON 扩展的 API,它使您能够以 NoSQL 的方式(像DynamoDB这样)存储数据。

使用示例:

use hotpot_db::*;
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
struct Person {
    name: String,
    age: u8,
}

fn main() -> Result<(), hotpot_db::Error> {
    let mut pot = HotPot::new();

    // lets make a new collection
    pot.create_collection("address_book")?;

    // well make a new item we want to store
    let person = Person {
        name: String::from("david holtz"),
        age: 26,
    };

    // we insert the object into the collection!
    pot.insert::<Person>("address_book", &person)?;

    // before we query we can add an index to speed things up
    pot.add_index_to_collection("address_book", "name", "naming_index")?;

    // finally we can query
    let query = QueryBuilder::new()
        .collection("address_book")
        .kind(QueryKind::Object)
        .key("name")
        .comparison("=")
        .string("david holtz")
        .finish();

    let results = pot.execute(query);
    println!("{:#?}", results);

    Ok(())
}

项目地址:https://github.com/drbh/hotpot-db

reddit 上参与讨论:https://www.reddit.com/r/rust/comments/f2vbji/github_drbhhotpotdb_hottest_way_to_store_data_on/


From 日报小组 @Jancd

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值