WebAssembly 简介 - 陈思衡第三届中国Rust开发者大会 WebAssembly 简介 WebAssembly(简称 Wasm)是一种新的编译目标,帮助在 web 中运行高性能应用。它是一种低级语言,设计为编 译器目标,以在 web 浏览器中高效运行。 WebAssembly 介绍 WebAssembly 代码可以以接近原生的速度 运行,且具有很小的二进制大小和快速加 载速度。 # 高性能 WebAssembly 最初由 Mozilla、Google、 Edge。 # 标准稳定 # 多语言支持 WebAssembly 设计为安全地嵌入到网页 中。它提供一种沙箱环境,禁止直接访问 浏览器功能或用户数据。而是需要通过 host function 来访问宿主环境。 # 安全性 现在多种语言都有编译器支持 WebAssembly,如 C/C++、Rust、Go、Zig 等。 WebAssembly 简介 Photo / image / chart 所看到的地址。 WebAssembly 机制 memory Wasm 编写的 function 可以通过 “export” 导出给 host 调用。 Host 可以把自己的 function 通过 “import“ 提供给 wasm 调用。 function WebAssembly 简介 Photo / image / chart Wasm 实例 WebAssembly 简介 WASI0 码力 | 24 页 | 773.46 KB | 1 年前3
基于 Rust 语言编写的可编程的全球分布式 MQTT 服务器 王文庭性能(C/C++/Rust) • 开发效率 (Rust/Golang/Java) • 编译的产物要⾜够⼩(C/C++/Rust) • 内存安全(Rust/Golang/Java) • 对WebAssembly⽣态⽀持友好 Why Rust? • 云端架构,我们⽆法根据设备地理位置实现就近通讯 • 只能做到在数据中⼼内相关的分布式扩展,⽆法直接进⾏ 全球节点的扩展 • 复杂的容灾⽅案 2)对接标准协议+公共函数 场景:多⼚商协议快速兼容 geo-distributed + 函数式开发 = 边缘计算 整体架构 • Webassembly,简称wasm • ⽤⼀句话描述,那就是Webassembly是执⾏程序的标准化字节码格式 • Webassembly最初被发明,是⽤于Web浏览器。 • 由W3C⼯作组开发的Web浏览器标准,于2017年11⽉, Chrome,Firefox Safari四⼤浏览器都开始实验性的⽀持 • 它在浏览器以外也有很⼴泛的运⽤,特别是在边缘计算领域。 • ⽀持多语⾔开发,⽐如Go,Python, rust,Javascript等 什么是Webassembly? 1. 所需求运⾏资源⼩(~64Kb for code and ~10Kb RAM) 2. 异构设备兼容性强(x86, ARM, RISC-V, MIPS, Raspberry Pi, Orange0 码力 | 31 页 | 3.95 MB | 1 年前3
应用 waPC (rust) 做软件测试工具poon 潘泳权 大家好! @rustropy_gaming ruito_89 PhoTto / image / chart Webassembly Procedures Call waPC 协议标准化了本机代码调用 WebAssembly 和 WebAssembly 调用本机代码的通信 (messaging) 和 错误处理 (error handling) 。 什么是 waPC? WASM0 码力 | 30 页 | 2.50 MB | 1 年前3
PromQL Got a BOOST: 用 Rust 重写 Prometheus 的查询引擎Rust projects has exceeded 1/10 of Golang’s With some key infrastructure like WebAssembly WEBASSEMBLY waynexia / datafusion-playground INTEROPERABILITY @coprocessor(returns=['value']) def0 码力 | 39 页 | 6.95 MB | 1 年前3
夏歌-使用Rust构建LLM应用it in Rust • 笨重 • 资源占用多 • 大部分时间是在等待 • 轻量级 • 资源占用量小 • 节省大量计算资源 Python 与 Docker Rust 与 WebAssembly 为什么要用 Rust ? Rewrite it in Rust Rust 太难学! 为什么不用 Rust ? 学习曲线太陡峭了,学习周期太长了 招 Rust 开发太难了 Low crate ,比如 ChatGPT 、 telegram 、 GitHub 、 Discord 、向量数据库比如 qdront 。 • 整个 serverless 平台是为 Rust 和 WebAssembly 设计的 视频演示如何使用 serverless 的方式部署 一个 PR review 机器人。 待插入视频,大概是 2 分钟的录屏 Talk is cheap, show me the0 码力 | 36 页 | 38.31 MB | 1 年前3
Rust在Substrate 开发框架中的使用// access the data protected by the lock Rust 特性 - 并发 Why Rust: ● All the above features ● WebAssembly 例子: ● Substrate ● Libra Rust in blockchain Why blockchain? 后端: ● 开发语言:Java, Ruby ● 框架:Spring,Rails ● Transaction pool ● Full / light client ● Runtime modules Substrate简介 libp2p CONSENSUS WEBASSEMBLY smart contracts staking slashing csprng governance dao parachains permissions Rust 编译为Wasm0 码力 | 37 页 | 967.22 KB | 1 年前3
运⾏在浏览器中的 P2P ⽹络 - 李敏成rings-node A structured P2P network implementation. Using WebRTC and Chord algorithm. With full WebAssembly (WASM) support. Repo: https://github.com/RingsNetwork/rings-node Connect through WebRTC Route0 码力 | 23 页 | 1.74 MB | 1 年前3
唐刚 - Use Rust to Develop the Decentralized Open Data Application - RustChinaConf2023Test and Deploy subnode subxt proxy http gate postgres redis app biz + = ODA ➔ Rust ➔ WebAssembly ➔ Substrate ➔ Wasmtime ➔ Spin ➔ Redis ➔ Postgresql The EightFish Tech Stack One EightFish network0 码力 | 30 页 | 2.53 MB | 1 年前3
Rust 在算法交易中的实际应用与积极效应1. 基于 Rust 宏 2. 在编译时展开为 Rust 代码, 静态编译为 native 二进制 3. 进一步提升研究->回测->实盘 的迭代效率 在浏览器内基于 Rust + WebAssembly 的高性能可视化工具 直接在 web 中直接看因子值 Rust 应用场景展望 - 高性能可视化 预测值和策略执行细节并即席调优 商务合作 技术交流 官网:ft.tech 电话:021-50710 码力 | 18 页 | 3.49 MB | 1 年前3
THE FIRST EXPLORATION OF PROJECT SPARROWio/en/latest/advanced/building_from_sources.html … III. Sparrow Development add a WebAssembly-license file to $SRC_RENODE/lib/resources/libraries/ and rebuild: … III. Sparrow0 码力 | 68 页 | 13.14 MB | 1 年前3
共 22 条
- 1
- 2
- 3













