博客
关于我
【Rust日报】2020-11-09 构建可测试性的 Rust 工程
阅读量:685 次
发布时间:2019-03-17

本文共 2323 字,大约阅读时间需要 7 分钟。

构建可测试性的 Rust 工程

最近 reddit 上有不少人对 Rust 的工程如何进行组织, 以及如何才能进行更加完善的测试进行了一些讨论.

下面的文章给出了一个 web 服务的例子, 演示了如何来组织 Rust 中的模块, 以及如何让代码更加具有测试性.

原文链接: https://medium.com/better-programming/structuring-rust-project-for-testability-18207b5d0243

antler: 一个无纹理的渲染引擎

ANTLER是一个无纹理的渲染引擎.

通过编写类似下面的格式的配置, 既可以让引擎渲染出非常炫酷的效果.

{    tree: { Here: {                                 // Adaptive-tree settings specified here:        tar_tris: 5,                                // Target num triangles per leaf cell.        max_depth: 8,                               // (ignore) Maximum tree splitting depth.        padding: 0.01,                              // (ignore) Fraction to increase leaf cells.    }},    sett    : { There: 'sett/standard.json5' },     // Use the sim settings from this file.    shader  : { There: 'shaders/nice.json5' },      // Use the shader from this file.    surfs   : { There: 'scenes/path.json5' },       // Thus surfaces in this file.    attrs   : { There: 'attrs/path.json5' },        // Use the attributes from this file.    cols    : { There: 'cols/path.json5' },         // Use the colours from this file.    cam     : { Here: {                             // Camera settings specified here:        pos     : [-52, 0, 7],                      // Camera observation position.        tar     : [-4.5, 0, 1.2],                   // Camera target postion.        lens    : { Perspective: {fov: 60.0} },     // Lens type and parameters.        aspect  : "Square",                         // Aspect ratio type.        // ss_power: 3,                             // Optional super sampling. NxN per pixel.        hr_res  : 400,                              // Number of horizontal pixels.    }},    update_size: 400,                               // Pixels per window refresh.}

渲染示例图:

github 地址: https://github.com/FreddyWordingham/antler

Rust for gophers

这是为 golang 使用者打造的一系列学习 Rust 的指南. 可以让 gophers 快速找到 golang 在 Rust 中对应的知识点.

目前已经更新到了第六章. 从 golang 转过来的小伙伴可以看看.

原文链接: https://levpaul.com/posts/rust-lesson-5-and-6/

使用 Rust 创造一门新语言: Part 9, Function calls

这是<<使用 Rust 创造一门新语言>>的最新一章, 函数调用.

原文链接: https://arzg.github.io/lang/9/

email-parser: 解析最快的 emial 库

email-parser 是一个无任何依赖,目前解析最快的一个 email 解析库.

github地址: https://github.com/Mubelotix/email-parser

--

From 日报小组 BobQin,FBI小白

社区学习交流平台订阅:

  • Rustcc论坛: 支持rss

  • 微信公众号:Rust语言中文社区

转载地址:http://ijohz.baihongyu.com/

你可能感兴趣的文章
Mysql5.7深入学习 1.MySQL 5.7 中的新增功能
查看>>
Webpack 之 basic chunk graph
查看>>
Mysql5.7版本单机版my.cnf配置文件
查看>>
mysql5.7的安装和Navicat的安装
查看>>
mysql5.7示例数据库_Linux MySQL5.7多实例数据库配置
查看>>
Mysql8 数据库安装及主从配置 | Spring Cloud 2
查看>>
mysql8 配置文件配置group 问题 sql语句group不能使用报错解决 mysql8.X版本的my.cnf配置文件 my.cnf文件 能够使用的my.cnf配置文件
查看>>
MySQL8.0.29启动报错Different lower_case_table_names settings for server (‘0‘) and data dictionary (‘1‘)
查看>>
MYSQL8.0以上忘记root密码
查看>>
Mysql8.0以上重置初始密码的方法
查看>>
mysql8.0新特性-自增变量的持久化
查看>>
Mysql8.0注意url变更写法
查看>>
Mysql8.0的特性
查看>>
MySQL8修改密码报错ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
查看>>
MySQL8修改密码的方法
查看>>
Mysql8在Centos上安装后忘记root密码如何重新设置
查看>>
Mysql8在Windows上离线安装时忘记root密码
查看>>
MySQL8找不到my.ini配置文件以及报sql_mode=only_full_group_by解决方案
查看>>
mysql8的安装与卸载
查看>>
MySQL8,体验不一样的安装方式!
查看>>