前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【Rust日报】 2019-08-29:在 Postgres 中运行 WebAssembly

【Rust日报】 2019-08-29:在 Postgres 中运行 WebAssembly

作者头像
MikeLoveRust
发布2019-09-03 10:47:00
9570
发布2019-09-03 10:47:00
举报

sn0int - 半自动化 OSINT 框架和包管理器

OSINT 就是“公开资源情报”,常见于安全和黑客领域。这个 sn0int 是给 IT 安全专业人士和 bug 捕获者设计的 OSINT 框架及包管理器。它用于对给定的目标或你自己搜集情报,生成统一的格式,给后续的研究使用。

Rust 已经悄悄占领安全/黑客领域了。https://sn0int.readthedocs.io/en/stable/

Repo: https://github.com/kpcyrd/sn0int

insta - 快照测试库

Snapshots tests (also sometimes called approval tests) are tests that assert values against a reference value (the snapshot). This is similar to how assert_eq! lets you compare a value against a reference value but unlike simple string assertions snapshot tests let you test against complex values and come with comprehensive tools to review changes.

Snapshot tests are particularly useful if your reference values are very large or change often.

快照测试(有时也被称作赞成性测试)就是把值与一个引用值(快照)进行断言。有点像 assert_eq!。但是 assert_eq! 只是简单的字符串等类型的测试,快照测试支持进行复杂类型值的断言,并提供全面的功能进行更改校审。

快照测试在对值对象非常大或者改动非常频繁的时候,非常有用。

Repo: https://github.com/mitsuhiko/insta

mobi-rs - 查看 .mobi 格式电子书的 Rust 库

可以解析和操作 .mobi 文件。比如:

代码语言:javascript
复制
use mobi::Mobi;
fn main() {
    let m = Mobi::init(Path::new("/home/wojtek/Downloads/lotr.mobi")).unwrap();
    let title = m.title().unwrap();
    let author = m.author().unwrap();
    let publisher = m.publisher().unwrap();
    let desc = m.description().unwrap();
    let isbn = m.isbn().unwrap();
    let pub_date = m.publish_date().unwrap();
    let contributor = m.contributor().unwrap();
    println!("{}\n{}\n{}\n{}\n{}\n{}\n{}\n", title, author, publisher, isbn, pub_date, desc, contributor);
}

Repo: https://github.com/wojciechkepka/mobi-rs

luminance-rs - 类型安全/type-level和无状态的 Rust 图形框架

luminance 致力于让图形渲染变得简单优雅。它最初由 @phaazon 使用 Haskell 实现,在 2016 年的时候,移植到了 Rust 上面。

Where gfx-hal provides you with an experience focused on down-to-metal performance and an API very similar to Vulkan’s, luminance provides an API that is, for sure, a bit less low-level — and hence, yes, it’s likely you will not have the same performances as with gfx-hal (even though no benchmarks have been done so far), and the API is not Vulkan-based — but easier to start with, especially if you don’t already have a background experience with OpenGL or Vulkan.

Repo: https://github.com/phaazon/luminance-rs

icon-pie - 用命令行产生应用程序图标

用来将已有素材,转换,合成标准的 icon 规范的图标。像下面这样:

代码语言:javascript
复制
$ icon-pie -e small.svg 16 20 24 -e big.png 32 64 -ico output.ico
$ icon-pie -e image.png 32 64 48 -r linear -png output.tar
$ echo Here's an ICNS file: ${ icon-pie -e image.jpg 16 32 64 -r cubic -icns | hexdump }

Repo: https://github.com/GarkGarcia/icon-pie

ts-results - Rust 对 Typescript 的影响之一,Result

Typescript 的 Result 实现,完全借鉴自 Rust。

Repo: https://github.com/vultix/ts-results

space_shooter_rs - 用来演示 Amethyst 游戏框架的又一个游戏:打飞机

打飞机!

效果还行吧!

Repo: https://github.com/amethyst/space_shooter_rs/

postgres-ext-wasm - 在 Postgres 中运行 WebAssembly

Wasmer 那帮人真的是疯狂,在我们都还在畅想 wasm 的应用场景的时候,他们已经将 wasm 塞进了 postgres。postgres-ext-wasm 是一个 pg 扩展,用来执行 wasm 二进制文件。

目测,项目想法是想用任何语言完成之前只有 PL/pgSQL 才能完成的事情!文章中就用 Rust 写了一个例子展示,不过目前只支持 + 法。

小编觉得 pg 这个智慧的结晶,真的值得好好挖掘一下的。

Repo: https://github.com/wasmerio/postgres-ext-wasm


本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2019-08-29,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 Rust语言学习交流 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • sn0int - 半自动化 OSINT 框架和包管理器
  • insta - 快照测试库
  • mobi-rs - 查看 .mobi 格式电子书的 Rust 库
  • luminance-rs - 类型安全/type-level和无状态的 Rust 图形框架
  • icon-pie - 用命令行产生应用程序图标
  • ts-results - Rust 对 Typescript 的影响之一,Result
  • space_shooter_rs - 用来演示 Amethyst 游戏框架的又一个游戏:打飞机
  • postgres-ext-wasm - 在 Postgres 中运行 WebAssembly
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档