博客
关于我
【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报错Cannot find module ‘webpack‘ Require stack
查看>>
npm报错Failed at the node-sass@4.14.1 postinstall script
查看>>
npm报错fatal: Could not read from remote repository
查看>>
npm报错File to import not found or unreadable: @/assets/styles/global.scss.
查看>>
npm报错unable to access ‘https://github.com/sohee-lee7/Squire.git/‘
查看>>
npm淘宝镜像过期npm ERR! request to https://registry.npm.taobao.org/vuex failed, reason: certificate has ex
查看>>
npm版本过高问题
查看>>
npm的“--force“和“--legacy-peer-deps“参数
查看>>
npm的安装和更新---npm工作笔记002
查看>>
npm的常用操作---npm工作笔记003
查看>>
npm的常用配置项---npm工作笔记004
查看>>
npm的问题:config global `--global`, `--local` are deprecated. Use `--location=global` instead 的解决办法
查看>>
npm编译报错You may need an additional loader to handle the result of these loaders
查看>>
npm设置淘宝镜像、升级等
查看>>
npm设置源地址,npm官方地址
查看>>
npm设置镜像如淘宝:http://npm.taobao.org/
查看>>
npm配置安装最新淘宝镜像,旧镜像会errror
查看>>
NPM酷库052:sax,按流解析XML
查看>>
npm错误 gyp错误 vs版本不对 msvs_version不兼容
查看>>
npm错误Error: Cannot find module ‘postcss-loader‘
查看>>