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

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

构建可测试性的 Rust 工程

这个文本中讨论了如何组织 Rust 项目以提高测试性以及几个相关项目的示例。

近期 Reddit 上有不少讨论关于 Rust 工程的组织方式以及如何实现更完善的测试。而下面提供的文章中的例子展示了一个 Web 服务,在 Rust 中如何组织模块以及如何让代码更具测试性。

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

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

ANTLER 是一个无纹理渲染引擎。开发者可以通过编写特定格式的配置文件来实现炫酷效果。例如:

{    "tree": {        "Here": {            "tar_tris": 5,            "max_depth": 8,            "padding": 0.01        }    },    "sett": {        "There": "sett/standard.json5"    },    "shader": {        "There": "shaders/nice.json5"    },    "surfs": {        "There": "scenes/path.json5"    },    "attrs": {        "There": "attrs/path.json5"    },    "cols": {        "There": "cols/path.json5"    },    "cam": {        "Here": {            "pos": [-52, 0, 7],            "tar": [-4.5, 0, 1.2],            "lens": {                "Perspective": {                    "fov": 60.0                }            },            "aspect": "Square",            "update_size": 400        }    }}

该引擎支持通过配置文件加载各种资源文件,用户可以根据需求进行调整和扩展。

Rust for gophers

这是为 Golang 开发者设计的一系列教程,旨在帮助他们快速学习 Rust。涵盖了从基础到高级的内容,帮助 Go 开发者更好地理解 Rust 的核心概念。目前教程内容到第六章,内容与 Golang 的熟悉度高度匹配。

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

使用 Rust 创造一门新语言: 函数调用

这是《使用 Rust 创造一门新语言》系列中的最新章节,聚焦于函数调用机制。该章节详细讲解了如何在新语言中实现函数的调用,涵盖了返回类型、变量传递以及错误处理等内容。

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

email-parser: 解析最快的邮件库

email-parser 是一个无依赖的邮件解析库,据称解析速度最快。该库针对性能优化,适合处理大量邮件数据。

GitHub 地址: GitHub.com/Mubelotix/email-parser

社区资源

  • Rustcc 论坛: 支持 RSS 订阅
  • 微信公众号: Rust 语言中文社区

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

你可能感兴趣的文章
npm install报错,证书验证失败unable to get local issuer certificate
查看>>
npm install无法生成node_modules的解决方法
查看>>
npm install的--save和--save-dev使用说明
查看>>
npm node pm2相关问题
查看>>
npm run build 失败Compiler server unexpectedly exited with code: null and signal: SIGBUS
查看>>
npm run build报Cannot find module错误的解决方法
查看>>
npm run build部署到云服务器中的Nginx(图文配置)
查看>>
npm run dev 和npm dev、npm run start和npm start、npm run serve和npm serve等的区别
查看>>
npm run dev 报错PS ‘vite‘ 不是内部或外部命令,也不是可运行的程序或批处理文件。
查看>>
npm scripts 使用指南
查看>>
npm should be run outside of the node repl, in your normal shell
查看>>
npm start运行了什么
查看>>
npm WARN deprecated core-js@2.6.12 core-js@<3.3 is no longer maintained and not recommended for usa
查看>>
npm 下载依赖慢的解决方案(亲测有效)
查看>>
npm 安装依赖过程中报错:Error: Can‘t find Python executable “python“, you can set the PYTHON env variable
查看>>
npm.taobao.org 淘宝 npm 镜像证书过期?这样解决!
查看>>
npm—小记
查看>>
npm介绍以及常用命令
查看>>
NPM使用前设置和升级
查看>>
npm入门,这篇就够了
查看>>