前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【Rust 日报】2024-03-24 wasm 运行时版本管理器 wasmenv

【Rust 日报】2024-03-24 wasm 运行时版本管理器 wasmenv

作者头像
MikeLoveRust
发布2024-04-01 11:10:38
590
发布2024-04-01 11:10:38
举报

[new library] wasmenv

wasmenv 是一个基于 Rust 的 wasm 运行时版本管理器。目前 wasmtime 仅支持 wasmer。此项目允许我们轻松地在不同版本的 wasmer 之间切换、管理安装和配置 shell 环境。

代码语言:javascript
复制
$ wasmenv --help

Usage: wasmenv <COMMAND>

Commands:
  current  Display the currently active version of wasmer
  shell    Configure wasmenv for a specific shell (bash, zsh, fish)
  use      Install wasmer
  list     List all the available versions of wasmer
  exec     Run command with wasmer
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

GitHub: https://github.com/ayys/wasmenv

[new library] crows

Crows 是一个分布式负载和压力测试运行程序。测试可以用任何可以编译为 WASM 的语言编写,前提是库的绑定可用。目前,绑定仅适用于 Rust,但是一旦 ABI 稳定下来,添加更多语言应该相对简单。一个用 Rust 编写的示例场景看起来像这样:

代码语言:javascript
复制
#[config]
fn config() -> ExecutorConfig {
    let config = ConstantArrivalRateConfig {
        duration: Duration::from_secs(5),
        rate: 10,
        allocated_vus: 10,
        ..Default::default()
    };
    ExecutorConfig::ConstantArrivalRate(config)
}

#[export_name = "scenario"]
pub fn scenario() {
    http_request(
        "https://google.com".into(), GET, HashMap::new(), "".into(),
    );
}

它将每秒向 google.com 发送 10 个请求。

文章: https://itsallaboutthebit.com/crows/

GitHub: https://github.com/drogus/crows

[new library] lancelot

重建控制流程的 Intel x86(-64)代码分析库。

文章: https://www.williballenthin.com/post/rust-compilation-time/

GitHub: https://github.com/williballenthin/lancelot

[new version] rq 0.1.0

rq 是一种微小的函数式语言,可以使用它来操作 JSON。基本上,它是用 Rust 编写的 jq(一个微不足道的子集)。这也是它的第一个release版本。

使用示例:

代码语言:javascript
复制
$ cat test.json
[{"name": "John Doe", "age": 43, "phones": ["+44 1234567", "+44 2345678"]}]

$ cat test.json | rq '\x -> x.0.phones.1'
+44 2345678

GitHub: https://github.com/slotThe/rq

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

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

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

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

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • [new library] wasmenv
  • [new library] crows
  • [new library] lancelot
  • [new version] rq 0.1.0
相关产品与服务
腾讯云服务器利旧
云服务器(Cloud Virtual Machine,CVM)提供安全可靠的弹性计算服务。 您可以实时扩展或缩减计算资源,适应变化的业务需求,并只需按实际使用的资源计费。使用 CVM 可以极大降低您的软硬件采购成本,简化 IT 运维工作。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档