26 releases (14 breaking)

Uses new Rust 2024

new 0.30.1 May 2, 2025
0.29.2 Apr 2, 2025
0.29.1 Mar 6, 2025
0.28.0 Dec 12, 2024
0.17.0 May 30, 2023

#372 in Magic Beans

Download history 165/week @ 2025-01-12 95/week @ 2025-01-19 100/week @ 2025-01-26 189/week @ 2025-02-02 167/week @ 2025-02-09 274/week @ 2025-02-16 151/week @ 2025-02-23 391/week @ 2025-03-02 168/week @ 2025-03-09 138/week @ 2025-03-16 117/week @ 2025-03-23 255/week @ 2025-03-30 377/week @ 2025-04-06 160/week @ 2025-04-13 343/week @ 2025-04-20 260/week @ 2025-04-27

1,159 downloads per month
Used in 6 crates

MIT OR Apache-2.0 WITH LLVM-exception

140KB
3K SLoC

near-vm-types

This crate is a fork of wasmer-types. A significant number of things changed, but the documentation is not up-to-date yet.

This library provides all the types and traits necessary to use WebAssembly easily anywhere.

Among other things, it defines the following types:

  • units like Pages or Bytes
  • types and values like I32, I64, F32, F64, ExternRef, FuncRef, V128, value conversions, ExternType, FunctionType etc.
  • native contains a set of trait and implementations to deal with WebAssembly types that have a direct representation on the host,
  • memory_view, an API to read/write memories when bytes are interpreted as particular types (i8, i16, i32 etc.)
  • indexes contains all the possible WebAssembly module indexes for various types
  • initializers for tables, data etc.
  • features to enable or disable some WebAssembly features inside the Wasmer runtime

Acknowledgments

This project borrowed some of the code for the entity structure from cranelift-entity. We decided to move it here to help on serialization/deserialization and also to ease the integration with other tools like loupe.

Please check Wasmer ATTRIBUTIONS to further see licenses and other attributions of the project.

Dependencies

~3MB
~60K SLoC