• 【Rust日报】2022-06-27 Rust 中使用 wasm 来执行 OPA 策略


    Rust 中使用 wasm 来执行 OPA 策略

    开放策略代理(Open Policy Agent, OPA)是一种开源的通用策略引擎,它支持跨整个环境中执行统一的上下文感知策略. OPA 是 云原生计算基金会(CNCF)的一个毕业项目。

    本文介绍了如何在 Rust 中使用 wasm 来执行 OPA 的策略.

    原文链接:https://inspektor.cloud/blog/evaluating-open-policy-agent-in-rust-using-wasm/

    keypath: Rust中的 keypath 实现

    这是在 Rust 中实现 swift 风格keypath的早期实验. 可以实现对任意嵌套字段的强类型引用. 目前它只是一个概念验证. 示例代码如下.

    1. #[derive(Keyable)]struct Person {
    2. name: String,
    3. friends: Vec<String>,
    4. size: Size,
    5. }#[derive(Keyable)]struct Size {
    6. big: bool,
    7. heft: u8,
    8. }let mut person = Person {
    9. name: "coco".into(),
    10. friends: vec!["eli".into(), "nico".into(), "yaya".into()],
    11. size: Size { big: false, heft: 45 }
    12. };let first_friend: KeyPath<Person, String> = keypath!(Person.friends[0]);let heft = keypath!(Person.size.heft);assert_eq!(person[&first_friend], "eli");// mutation:person[&heft] = 101;assert_eq!(person.size.heft, 101);

    原文链接:http://www.cmyr.net/blog/keypaths.html

    keypath github 地址:https://github.com/cmyr/keypath

    <<Rust 从零到生产>> 笔记

    作者买了 Palmieri 的 <<Rust 从零到生产>> 这本书, 本文是学习笔记分享, 也算是对于该书的点评.

    原文链接:https://bitemyapp.com/blog/notes-on-zero2prod-rust/

    generational-lru: 一个新的 LRU 实现

    基于 generational arena 实现的 LRU 实现.

    原文链接:https://github.com/arindas/generational-lru

    Rust 中的 Rc和 RefCell

    一个介绍 Rc 和 RefCell 的视频,需要科学上网.

    油管视频:https://www.youtube.com/watch?v=KYJ95TxEC18

    --

    From 日报小组 BobQin,FBI小白

    社区学习交流平台订阅:

    • Rustcc论坛: 支持rss

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

  • 相关阅读:
    深度学习:模型训练过程中Trying to backward through the graph a second time解决方案
    1.1MQ的基本概念,优劣势介绍及 RabbitMQ简介
    什么是Spring的loC和Dl?
    C++引用内联auto关键字等介绍
    SpringBoot学习(一)---初识SpringBoot
    掌动智能云网络流量分析的重要性
    生成树协议
    对中定位夹具运动分析及仿真
    2013年108计网
    巧用大数据分析工具,让本地数据输入速度提升2倍的方法
  • 原文地址:https://blog.csdn.net/u012067469/article/details/125494421