Skip to content

v0.2.0

Choose a tag to compare

@dmitry123 dmitry123 released this 01 Jul 19:39
· 221 commits to devel since this release
0074236

Release Highlights

This release delivers a complete rewrite of the rWasm compiler, introduces a 32-bit translator, and refactors the codebase for clarity and maintainability.

Features

  • New Compiler Core: Entire rWasm compiler re-implemented for better modularity and performance.
  • 32-bit Translator: Support for 32-bit stack/memory modes.
  • Major Refactoring: Modularized VM, improved Wasmtime integration, streamlined build system, and clearer fuel accounting.
  • Better Testing & Debug: Enhanced tracing, expanded e2e/unit tests, improved benchmarks.

Bug Fixes

  • Translation for 64-bit Ops: Fixed stack height, trampoline mapping, memory/table segment handling, and many opcode edge cases.
  • Stack/Memory Safety: More robust overflow and boundary checks throughout execution.

Other Improvements

  • Smarter import linker and module checks.
  • Improved handling for system calls and resumable execution.
  • Build and CI script cleanups.

Changelog

Features

  • fuel: Emit fuel_procedure when linking with builtins (@xozzslip)
  • rwasm: Add new modular executor, bytecode executor, and executor integration (@dmitry123)
  • constructor: Add support for custom sections and configurable instruction alignment (@xozzslip, @dmitry123)
  • module: Add Hash trait, Eq/Clone derives, is_empty methods, expose FuelCosts, and module instantiation logic (@dmitry123)
  • router: Improve state router with support, configurable validation, and drop/keep translation (@dmitry123)
  • entrypoint: Support malformed entrypoint types and use u32::MAX for null FuncRef (@dmitry123)
  • expr: Add from_const constructor for ConstExpr, reduced module conversion, and new_or_empty/empty helpers (@dmitry123)
  • segment: Add element/data segment helpers and refactor table initialization (@dmitry123)
  • import: Add/optimize import linker and signature checks for indirect calls (@dmitry123)
  • 32-bit: Add integer overflow check for i64 div_s opcode (@b33ngo)
  • 32-bit: Add formatter, rework param/result encoding, stack height, and global/table/memory/ref/rotate/select/shift/rem/br_table opcodes (@b33ngo)

Bug Fixes

  • opcode: Resolve StackAlloc, i64_div_u, drop/keep, locals, memory section, stack state, trampoline mapping, Makefile tests, and ensure only funcref elements (@dmitry123, @b33ngo)
  • memory: Add/resolve memory overflow, stack overflow, data segment overflow, e2e 32-bit mode, underflow/overflow validation (@dmitry123, @b33ngo)
  • translator: Fix function index handling, import linker, and function type conversion (@dmitry123, @b33ngo)
  • opcode: Correct sign inversion, division, and sine fixes (@b33ngo)
  • test: Correct various e2e, unit, and Makefile test errors (@dmitry123, @b33ngo)
  • compat: Resolve no_std compatibility, hashbrown features, and config issues (@dmitry123)
  • call: Ensure stack drop before call, resolve calling router for wasm start section (@dmitry123)
  • doc: Correct grammar and comments across modules (@dmitry123)
  • stack: Optimize/correct stack height, locals, param converting, rwlock, borrow mut, debug handling (@dmitry123, @b33ngo)

Refactoring

  • rwasm: Move executor and codegen, update compiled modules, remove redundant structures/enums/debug lines, adapt to new encoding scheme (@dmitry123)
  • module: Replace FuncType, todos, update constants/scoping for binary format and modules (@dmitry123)
  • import: Optimize import linker, compilation, warnings, split code (wasmi/rwasm), migrate compiler logic (@dmitry123)

Chores

  • Update/add/readme, upgrade dependencies, add logging, update wast, make tracer/caller optional (@dmitry123, @bfdays)

Testing

  • Enable/expand encoding/decoding, spec, and e2e tests; disable unstable tests; hardcode test scenarios (@dmitry123)

Documentation

  • Add instruction/module encoding specs, config comments (@dmitry123)

What's Changed

  • feat(tracing): new tracer for rwasm by @dmitry123 in #15
  • feat(new-gas-model): refine gas calculation for rwasm opcodes by @dmitry123 in #17
  • feat(wasmtime): adapter for wasmtime execution by @dmitry123 in #16
  • feat(builtins-fuel): add fuel builtins for imported functions by @xozzslip in #19
  • chore(deps): bump codecov/codecov-action from 5.4.2 to 5.4.3 by @dependabot in #14
  • feat(wasmtime-fpu): use wasmtime fork that supports disabling FPU opcodes by @xozzslip in #20
  • fix(stack-overflow): refine execution engine and how it operates with shared resources by @dmitry123 in #21

New Contributors

Full Changelog: v0.1.0-dev...v0.2.0-dev