1-------------------------------------------------------------------------------- 2 3## 0.41.0 4 5Unreleased. 6 7### Added 8 9### Changed 10 11-------------------------------------------------------------------------------- 12 13## 0.40.0 14 15Released 2022-08-20 16 17This was a relatively quiet release in terms of user-facing features where most 18of the work was around the internals of Wasmtime and Cranelift. Improvements 19internally have been made along the lines of: 20 21* Many more instructions are now implemented with ISLE instead of handwritten 22 lowerings. 23* Many improvements to the cranelift-based fuzzing. 24* Many platform improvements for s390x including full SIMD support, running 25 `rustc_codegen_cranelift` with features like `i128`, supporting more 26 ABIs, etc. 27* Much more of the component model has been implemented and is now fuzzed. 28 29Finally this release is currently scheduled to be the last `0.*` release of 30Wasmtime. The upcoming release of Wasmtime on September 20 is planned to be 31Wasmtime's 1.0 release. More information about what 1.0 means for Wasmtime is 32available in the [1.0 RFC] 33 34[1.0 RFC]: https://github.com/bytecodealliance/rfcs/blob/main/accepted/wasmtime-one-dot-oh.md 35 36### Added 37 38* Stack walking has been reimplemented with frame pointers rather than with 39 native unwind information. This means that backtraces are feasible to capture 40 in performance-critical environments and in general stack walking is much 41 faster than before. 42 [#4431](https://github.com/bytecodealliance/wasmtime/pull/4431) 43 44* The WebAssembly `simd` proposal is now fully implemented for the s390x 45 backend. 46 [#4427](https://github.com/bytecodealliance/wasmtime/pull/4427) 47 48* Support for AArch64 has been added in the experimental native debuginfo 49 support that Wasmtime has. 50 [#4468](https://github.com/bytecodealliance/wasmtime/pull/4468) 51 52* Support building the C API of Wasmtime with CMake has been added. 53 [#4369](https://github.com/bytecodealliance/wasmtime/pull/4369) 54 55* Clarification was added to Wasmtime's documentation about "tiers of support" 56 for various features. 57 [#4479](https://github.com/bytecodealliance/wasmtime/pull/4479) 58 59### Fixed 60 61* Support for `filestat_get` has been improved for stdio streams in WASI. 62 [#4531](https://github.com/bytecodealliance/wasmtime/pull/4531) 63 64* Enabling the `vtune` feature no longer breaks builds on AArch64. 65 [#4533](https://github.com/bytecodealliance/wasmtime/pull/4533) 66 67-------------------------------------------------------------------------------- 68 69## 0.39.1 70 71Released 2022-07-20. 72 73### Fixed 74 75* An s390x-specific codegen bug in addition to a mistake introduced in the fix 76 of CVE-2022-31146 were fixed. 77 [#4490](https://github.com/bytecodealliance/wasmtime/pull/4490) 78 79-------------------------------------------------------------------------------- 80 81## 0.39.0 82 83Released 2022-07-20 84 85### Added 86 87* Initial support for shared memories and the `threads` WebAssembly proposal 88 has been added. Note that this feature is still experimental and not ready 89 for production use yet. 90 [#4187](https://github.com/bytecodealliance/wasmtime/pull/4187) 91 92* A new `Linker::define_unknown_imports_as_traps` method and 93 `--trap-unknown-imports` CLI flag have been added to conveniently support 94 running modules with imports that aren't dynamically called at runtime. 95 [#4312](https://github.com/bytecodealliance/wasmtime/pull/4312) 96 97* The VTune profiling strategy can now be selected through the C API. 98 [#4316](https://github.com/bytecodealliance/wasmtime/pull/4316) 99 100### Changed 101 102* Some methods on the `Config` structure now return `&mut Self` instead of 103 `Result<&mut Self>` since the validation is deferred until `Engine::new`: 104 `profiler`, `cranelift_flag_enable`, `cranelift_flag_set`, `max_wasm_stack`, 105 `async_stack_size`, and `strategy`. 106 [#4252](https://github.com/bytecodealliance/wasmtime/pull/4252) 107 [#4262](https://github.com/bytecodealliance/wasmtime/pull/4262) 108 109* Parallel compilation of WebAssembly modules is now enabled in the C API by 110 default. 111 [#4270](https://github.com/bytecodealliance/wasmtime/pull/4270) 112 113* Implicit Cargo features of the `wasmtime` introduced through `optional` 114 dependencies may have been removed since namespaced features are now used. 115 It's recommended to only used the set of named `[features]` for Wasmtime. 116 [#4293](https://github.com/bytecodealliance/wasmtime/pull/4293) 117 118* Register allocation has fixed a few issues related to excessive memory usage 119 at compile time. 120 [#4324](https://github.com/bytecodealliance/wasmtime/pull/4324) 121 122### Fixed 123 124* A refactor of `Config` was made to fix an issue that the order of calls to `Config` 125 matters now, which may lead to unexpected behavior. 126 [#4252](https://github.com/bytecodealliance/wasmtime/pull/4252) 127 [#4262](https://github.com/bytecodealliance/wasmtime/pull/4262) 128 129* Wasmtime has been fixed to work on SSE2-only x86\_64 platforms when the 130 `simd` feature is disabled in `Config`. 131 [#4231](https://github.com/bytecodealliance/wasmtime/pull/4231) 132 133* Generation of platform-specific unwinding information is disabled if 134 `wasm_backtrace` and `wasm_reference_types` are both disabled. 135 [#4351](https://github.com/bytecodealliance/wasmtime/pull/4351) 136 137-------------------------------------------------------------------------------- 138 139## 0.38.3 140 141Released 2022-07-20. 142 143### Fixed. 144 145* An s390x-specific codegen bug in addition to a mistake introduced in the fix 146 of CVE-2022-31146 were fixed. 147 [#4491](https://github.com/bytecodealliance/wasmtime/pull/4491) 148 149-------------------------------------------------------------------------------- 150 151## 0.38.2 152 153Released 2022-07-20. 154 155### Fixed. 156 157* A miscompilation when handling constant divisors on AArch64 has been fixed. 158 [CVE-2022-31169](https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-7f6x-jwh5-m9r4) 159 160* A use-after-free possible with accidentally missing stack maps has been fixed. 161 [CVE-2022-31146](https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-5fhj-g3p3-pq9g) 162 163-------------------------------------------------------------------------------- 164 165## 0.38.1 166 167Released 2022-06-27. 168 169### Fixed. 170 171* A register allocator bug was fixed that could affect direct users of 172 Cranelift who use struct-return (`sret`) arguments. The bug had to do with 173 the handling of physical register constraints in the function prologue. No 174 impact should be possible for users of Cranelift via the Wasm frontend, 175 including Wasmtime. 176 [regalloc2#60](https://github.com/bytecodealliance/regalloc2/pull/60) 177 [#4333](https://github.com/bytecodealliance/wasmtime/pull/4333) 178 179* Lowering bugs for the `i8x16.swizzle` and `select`-with-`v128`-inputs 180 instructions were fixed for the x86\_64 code generator. Note that aarch64 and 181 s390x are unaffected. 182 [#4334](https://github.com/bytecodealliance/wasmtime/pull/4334) 183 184* A bug in the 8-bit lowering of integer division on x86-64 was fixed in 185 Cranelift that could cause a register allocator panic due to an undefined 186 value in a register. (The divide instruction does not take a register `rdx` 187 as a source when 8 bits but the metadata incorrectly claimed it did.) No 188 impact on Wasm/Wasmtime users, and impact on direct Cranelift embedders 189 limited to compilation panics. 190 [#4332](https://github.com/bytecodealliance/wasmtime/pull/4332) 191 192-------------------------------------------------------------------------------- 193 194## 0.38.0 195 196Released 2022-06-21 197 198### Added 199 200* Enabling or disabling NaN canonicalization in generated code is now exposed 201 through the C API. 202 [#4154](https://github.com/bytecodealliance/wasmtime/pull/4154) 203 204* A user-defined callback can now be invoked when an epoch interruption happens 205 via the `Store::epoch_deadline_callback` API. 206 [#4152](https://github.com/bytecodealliance/wasmtime/pull/4152) 207 208* Basic alias analysis with redundant-load elimintation and store-to-load 209 forwarding optimizations has been added to Cranelift. 210 [#4163](https://github.com/bytecodealliance/wasmtime/pull/4163) 211 212### Changed 213 214* Traps originating from epoch-based interruption are now exposed as 215 `TrapCode::Interrupt`. 216 [#4105](https://github.com/bytecodealliance/wasmtime/pull/4105) 217 218* Binary builds for AArch64 now require glibc 2.17 and for s390x require glibc 219 2.16. Previously glibc 2.28 was required. 220 [#4171](https://github.com/bytecodealliance/wasmtime/pull/4171) 221 222* The `wasmtime::ValRaw` now has all of its fields listed as private and instead 223 constructors/accessors are provided for getting at the internal data. 224 [#4186](https://github.com/bytecodealliance/wasmtime/pull/4186) 225 226* The `wasm-backtrace` Cargo feature has been removed in favor of a 227 `Config::wasm_backtrace` runtime configuration option. Additionally backtraces 228 are now only captured when an embedder-generated trap actually reaches a 229 WebAssembly call stack. 230 [#4183](https://github.com/bytecodealliance/wasmtime/pull/4183) 231 232* Usage of `*_unchecked` APIs for `Func` in the `wasmtime` crate and C API now 233 take a `usize` parameter indicating the number of `ValRaw` values behind 234 the associated pointer. 235 [#4192](https://github.com/bytecodealliance/wasmtime/pull/4192) 236 237### Fixed 238 239* An improvement was made to the spill-slot allocation in code generation to fix 240 an issue where some stack slots accidentally weren't reused. This issue was 241 introduced with the landing of regalloc2 in 0.37.0 and may have resulted in 242 larger-than-intended increases in stack frame sizes. 243 [#4222](https://github.com/bytecodealliance/wasmtime/pull/4222) 244 245-------------------------------------------------------------------------------- 246 247## 0.37.0 248 249Released 2022-05-20 250 251### Added 252 253* Updated Cranelift to use regalloc2, a new register allocator. This should 254 result in ~20% faster compile times, and for programs that suffered from 255 register-allocation pressure before, up to ~20% faster generated code. 256 [#3989](https://github.com/bytecodealliance/wasmtime/pull/3989) 257 258* Pre-built binaries for macOS M1 machines are now available as release 259 artifacts. 260 [#3983](https://github.com/bytecodealliance/wasmtime/pull/3983) 261 262* Copy-on-write images of memory can now be manually initialized for a `Module` 263 with an explicit method call, but it is still not required to call this method 264 and will automatically otherwise happen on the first instantiation. 265 [#3964](https://github.com/bytecodealliance/wasmtime/pull/3964) 266 267### Fixed 268 269* Using `InstancePre::instantiate` or `Linker::instantiate` will now panic as 270 intended when used with an async-configured `Store`. 271 [#3972](https://github.com/bytecodealliance/wasmtime/pull/3972) 272 273### Changed 274 275* The unsafe `ValRaw` type in the `wasmtime` crate now always stores its values 276 in little-endian format instead of the prior native-endian format. Users of 277 `ValRaw` are recommended to audit their existing code for usage to continue 278 working on big-endian platforms. 279 [#4035](https://github.com/bytecodealliance/wasmtime/pull/4035) 280 281### Removed 282 283* Support for `Config::paged_memory_initialization` and the `uffd` crate feature 284 have been removed from the `wasmtime` crate. Users should migrate to using 285 `Config::memory_init_cow` which is more portable and faster at this point. 286 [#4040](https://github.com/bytecodealliance/wasmtime/pull/4040) 287 288-------------------------------------------------------------------------------- 289 290## 0.36.0 291 292Released 2022-04-20 293 294### Added 295 296* Support for epoch-based interruption has been added to the C API. 297 [#3925](https://github.com/bytecodealliance/wasmtime/pull/3925) 298 299* Support for disabling libunwind-based backtraces of WebAssembly code at 300 compile time has been added. 301 [#3932](https://github.com/bytecodealliance/wasmtime/pull/3932) 302 303* Async support for call hooks has been added to optionally execute "blocking" 304 work whenever a wasm module is entered or exited relative to the host. 305 [#3876](https://github.com/bytecodealliance/wasmtime/pull/3876) 306 307### Fixed 308 309* Loading a `Module` will now check, at runtime, that the compilation settings 310 enabled in a `Config` are compatible with the native host. For example this 311 ensures that if avx2 is enabled that the host actually has avx2 support. 312 [#3899](https://github.com/bytecodealliance/wasmtime/pull/3899) 313 314### Removed 315 316* Support for `Config::interruptable` and `InterruptHandle` has been removed 317 from the `wasmtime` crate. Users should migrate to using epoch-based 318 interruption instead. 319 [#3925](https://github.com/bytecodealliance/wasmtime/pull/3925) 320 321* The module linking implementation of Wasmtime has been removed to make room 322 for the upcoming support for the component model. 323 [#3958](https://github.com/bytecodealliance/wasmtime/pull/3958) 324 325-------------------------------------------------------------------------------- 326 327## 0.35.3 328 329Released 2022-04-11. 330 331### Fixed 332 333* Backported a bugfix for an instruction lowering issue that could cause a 334 regalloc panic due to an undefined register in some cases. No miscompilation 335 was ever possible, but panics would result in a compilation failure. 336 [#4012](https://github.com/bytecodealliance/wasmtime/pull/4012) 337 338-------------------------------------------------------------------------------- 339 340## 0.35.2 341 342Released 2022-03-31. 343 344### Security Fixes 345 346* [CVE-2022-24791](https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-gwc9-348x-qwv2): 347 Fixed a use after free with `externref`s and epoch interruption. 348 349## 0.35.1 350 351Released 2022-03-09. 352 353### Fixed 354 355* Fixed a bug in the x86-64 lowering of the `uextend` opcode for narrow (`i8`, 356 `i16`) integer sources when the value is produced by one of several 357 arithmetic instructions. 358 [#3906](https://github.com/bytecodealliance/wasmtime/pull/3906) 359 360## 0.35.0 361 362Released 2022-03-07. 363 364### Added 365 366* The `wasmtime_wasi::add_to_linker` function now allows providing 367 a context object of a custom type instead of `wasmtime_wasi::WasiCtx`, 368 as long as that type implements the required WASI snapshot traits. 369 This allows, for example, wrapping `WasiCtx` into a struct and providing 370 custom implementations for those traits to override the default behaviour. 371 372### Changed 373 374* WebAssembly tables of `funcref` values are now lazily initialized which can, 375 in some cases, greatly speed up instantiation of a module. 376 [#3733](https://github.com/bytecodealliance/wasmtime/pull/3733) 377 378* The `memfd` feature in 0.34.0, now renamed to `memory-init-cow`, has been 379 enabled by default. This means that, where applicable, WebAssembly linear 380 memories are now initialized with copy-on-write mappings. Support from this 381 has been expanded from Linux-only to include macOS and other Unix systems when 382 modules are loaded from precompiled `*.cwasm` files on disk. 383 [#3777](https://github.com/bytecodealliance/wasmtime/pull/3777) 384 [#3778](https://github.com/bytecodealliance/wasmtime/pull/3778) 385 [#3787](https://github.com/bytecodealliance/wasmtime/pull/3787) 386 [#3819](https://github.com/bytecodealliance/wasmtime/pull/3819) 387 [#3831](https://github.com/bytecodealliance/wasmtime/pull/3831) 388 389* Clarify that SSE 4.2 (and prior) is required for running WebAssembly code with 390 simd support enabled on x86\_64. 391 [#3816](https://github.com/bytecodealliance/wasmtime/pull/3816) 392 [#3817](https://github.com/bytecodealliance/wasmtime/pull/3817) 393 [#3833](https://github.com/bytecodealliance/wasmtime/pull/3833) 394 [#3825](https://github.com/bytecodealliance/wasmtime/pull/3825) 395 396* Support for profiling with VTune is now enabled at compile time by default, 397 but it remains disabled at runtime by default. 398 [#3821](https://github.com/bytecodealliance/wasmtime/pull/3821) 399 400* The `ModuleLimits` type has been removed from the configuration of the pooling 401 allocator in favor of configuring the total size of an instance allocation 402 rather than each individual field. 403 [#3837](https://github.com/bytecodealliance/wasmtime/pull/3837) 404 405* The native stack size allowed for WebAssembly has been decreased from 1 MiB to 406 512 KiB on all platforms to better accomodate running wasm on the main thread 407 on Windows. 408 [#3861](https://github.com/bytecodealliance/wasmtime/pull/3861) 409 410* The `wasi-common` crate now supports doing polls for both read and write 411 interest on a file descriptor at the same time. 412 [#3866](https://github.com/bytecodealliance/wasmtime/pull/3866) 413 414### Fixed 415 416* The `Store::call_hook` callback is now invoked when entering host functions 417 defined with `*_unchecked` variants. 418 [#3881](https://github.com/bytecodealliance/wasmtime/pull/3881) 419 420### Removed 421 422* The incomplete and unmaintained ARM32 backend has been removed from Cranelift. 423 [#3799](https://github.com/bytecodealliance/wasmtime/pull/3799) 424 425-------------------------------------------------------------------------------- 426 427## 0.34.2 428 429Released 2022-03-31. 430 431### Security Fixes 432 433* [CVE-2022-24791](https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-gwc9-348x-qwv2): 434 Fixed a use after free with `externref`s and epoch interruption. 435 436## 0.34.1 437 438Released 2022-02-16. 439 440### Security Fixes 441 442* [CVE-2022-23636](https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-88xq-w8cq-xfg7): 443 Fixed an invalid drop of a partially-initialized instance in the pooling instance 444 allocator. 445 446## 0.33.1 447 448Released 2022-02-16. 449 450### Security Fixes 451 452* [CVE-2022-23636](https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-88xq-w8cq-xfg7): 453 Fixed an invalid drop of a partially-initialized instance in the pooling instance 454 allocator. 455 456## 0.34.0 457 458Released 2022-02-07. 459 460### Fixed 461 462* The `wasi-common` default implementation of some attributes of files has been 463 updated to ensure that `wasi-libc`'s `isatty` function works as intended. 464 [#3696](https://github.com/bytecodealliance/wasmtime/pull/3696) 465 466* A benign debug assertion related to `externref` and garbage-collection has 467 been fixed. 468 [#3734](https://github.com/bytecodealliance/wasmtime/pull/3734) 469 470### Added 471 472* Function names are now automatically demangled when informing profilers of 473 regions of JIT code to apply Rust-specific demangling rules if applicable. 474 [#3683](https://github.com/bytecodealliance/wasmtime/pull/3683) 475 476* Support for profiling JIT-generated trampolines with VTune has been added. 477 [#3687](https://github.com/bytecodealliance/wasmtime/pull/3687) 478 479* Wasmtime now supports a new method of async preemption dubbed "epoch-based 480 interruption" which is intended to be much more efficient than the current 481 fuel-based method of preemption. 482 [#3699](https://github.com/bytecodealliance/wasmtime/pull/3699) 483 484* On Linux Wasmtime will now by default use copy-on-write mappings to initialize 485 memories of wasm modules where possible, accelerating instantiation by 486 avoiding costly memory copies. When combined with the pooling allocator this 487 can also be used to speed up instance-reuse cases due to fewer syscalls to 488 change memory mappings being necessary. 489 [#3697](https://github.com/bytecodealliance/wasmtime/pull/3697) 490 [#3738](https://github.com/bytecodealliance/wasmtime/pull/3738) 491 [#3760](https://github.com/bytecodealliance/wasmtime/pull/3760) 492 493* Wasmtime now supports the recently-added `sock_accept` WASI function. 494 [#3711](https://github.com/bytecodealliance/wasmtime/pull/3711) 495 496* Cranelift now has support for specifying blocks as cold. 497 [#3698](https://github.com/bytecodealliance/wasmtime/pull/3698) 498 499### Changed 500 501* Many more instructions for the x64 backend have been migrated to ISLE, 502 additionally with refactorings to make incorrect lowerings harder to 503 accidentally write. 504 [#3653](https://github.com/bytecodealliance/wasmtime/pull/3653) 505 [#3659](https://github.com/bytecodealliance/wasmtime/pull/3659) 506 [#3681](https://github.com/bytecodealliance/wasmtime/pull/3681) 507 [#3686](https://github.com/bytecodealliance/wasmtime/pull/3686) 508 [#3688](https://github.com/bytecodealliance/wasmtime/pull/3688) 509 [#3690](https://github.com/bytecodealliance/wasmtime/pull/3690) 510 [#3752](https://github.com/bytecodealliance/wasmtime/pull/3752) 511 512* More instructions in the aarch64 backend are now lowered with ISLE. 513 [#3658](https://github.com/bytecodealliance/wasmtime/pull/3658) 514 [#3662](https://github.com/bytecodealliance/wasmtime/pull/3662) 515 516* The s390x backend's lowering rules are now almost entirely defined with ISLE. 517 [#3702](https://github.com/bytecodealliance/wasmtime/pull/3702) 518 [#3703](https://github.com/bytecodealliance/wasmtime/pull/3703) 519 [#3706](https://github.com/bytecodealliance/wasmtime/pull/3706) 520 [#3717](https://github.com/bytecodealliance/wasmtime/pull/3717) 521 [#3723](https://github.com/bytecodealliance/wasmtime/pull/3723) 522 [#3724](https://github.com/bytecodealliance/wasmtime/pull/3724) 523 524* Instantiation of modules in Wasmtime has been further optimized now that the 525 copy-on-write memory initialization removed the previously most-expensive part 526 of instantiating a module. 527 [#3727](https://github.com/bytecodealliance/wasmtime/pull/3727) 528 [#3739](https://github.com/bytecodealliance/wasmtime/pull/3739) 529 [#3741](https://github.com/bytecodealliance/wasmtime/pull/3741) 530 [#3742](https://github.com/bytecodealliance/wasmtime/pull/3742) 531 532-------------------------------------------------------------------------------- 533 534## 0.33.0 535 536Released 2022-01-05. 537 538### Added 539 540* Compiled wasm modules may now optionally omit debugging information about 541 mapping addresses to source locations, resulting in smaller binaries. 542 [#3598](https://github.com/bytecodealliance/wasmtime/pull/3598) 543 544* The WebAssembly SIMD proposal is now enabled by default. 545 [#3601](https://github.com/bytecodealliance/wasmtime/pull/3601) 546 547-------------------------------------------------------------------------------- 548 549## 0.32.1 550 551Released 2022-01-04. 552 553### Fixed 554 555* Cranelift: remove recently-added build dependency on `sha2` to allow usage in 556 some dependency-sensitive environments, by computing ISLE manifest hashes 557 with a different hash function. 558 [#3619](https://github.com/bytecodealliance/wasmtime/pull/3619) 559 560* Cranelift: fixed 8- and 16-bit behavior of popcount (bit population count) 561 instruction. Does not affect Wasm frontend. 562 [#3617](https://github.com/bytecodealliance/wasmtime/pull/3617) 563 564* Cranelift: fixed miscompilation of 8- and 16-bit bit-rotate instructions. 565 Does not affect Wasm frontend. 566 [#3610](https://github.com/bytecodealliance/wasmtime/pull/3610) 567 568-------------------------------------------------------------------------------- 569 570## 0.32.0 571 572Released 2021-12-13. 573 574### Added 575 576* A new configuration option has been added to force using a "static" memory 577 style to automatically limit growth of memories in some configurations. 578 [#3503](https://github.com/bytecodealliance/wasmtime/pull/3503) 579 580* The `InstancePre<T>` type now implements `Clone`. 581 [#3510](https://github.com/bytecodealliance/wasmtime/pull/3510) 582 583* Cranelift's instruction selection process has begun to be migrated towards the 584 ISLE compiler and definition language. 585 [#3506](https://github.com/bytecodealliance/wasmtime/pull/3506) 586 587* A `pooling-allocator` feature has been added, which is on-by-default, to 588 disable the pooling allocator at compile time. 589 [#3514](https://github.com/bytecodealliance/wasmtime/pull/3514) 590 591### Fixed 592 593* A possible panic when parsing a WebAssembly `name` section has been fixed. 594 [#3509](https://github.com/bytecodealliance/wasmtime/pull/3509) 595 596* Generating native DWARF information for some C-produced modules has been 597 fixed, notably those where there may be DWARF about dead code. 598 [#3498](https://github.com/bytecodealliance/wasmtime/pull/3498) 599 600* A number of SIMD code generation bugs have been fixed in the x64 backend 601 by migrating their lowerings to ISLE. 602 603-------------------------------------------------------------------------------- 604 605## 0.31.0 606 607Released 2021-10-29. 608 609### Added 610 611* New `Func::new_unchecked` and `Func::call_unchecked` APIs have been added with 612 accompanying functions in the C API to improve the performance of calls into 613 wasm and the host in the C API. 614 [#3350](https://github.com/bytecodealliance/wasmtime/pull/3350) 615 616* Release binaries are now available for the s390x-unknown-linux-gnu 617 architecture. 618 [#3372](https://github.com/bytecodealliance/wasmtime/pull/3372) 619 620* A new `ResourceLimiterAsync` trait is added which allows asynchronous blocking 621 of WebAssembly on instructions such as `memory.grow`. 622 [#3393](https://github.com/bytecodealliance/wasmtime/pull/3393) 623 624### Changed 625 626* The `Func::call` method now takes a slice to write the results into rather 627 than returning a boxed slice. 628 [#3319](https://github.com/bytecodealliance/wasmtime/pull/3319) 629 630* Trampolines are now covered when jitdump profiling is enabled. 631 [#3344](https://github.com/bytecodealliance/wasmtime/pull/3344) 632 633### Fixed 634 635* Debugging with GDB has been fixed on Windows. 636 [#3373](https://github.com/bytecodealliance/wasmtime/pull/3373) 637 638* Some quadradic behavior in Wasmtime's compilation of modules has been fixed. 639 [#3469](https://github.com/bytecodealliance/wasmtime/pull/3469) 640 [#3466](https://github.com/bytecodealliance/wasmtime/pull/3466) 641 642* Bounds-checks for wasm memory accesses in certain non-default configurations 643 have been fixed to correctly allow loads at the end of the address space. 644 [#3462](https://github.com/bytecodealliance/wasmtime/pull/3462) 645 646* When type-checking memories and tables for satisfying instance imports the 647 runtime size of the table/memory is now consulted instead of the object's 648 original type. 649 [#3450](https://github.com/bytecodealliance/wasmtime/pull/3450) 650 651### Removed 652 653* The Lightbeam backend has been removed, as per [RFC 14]. 654 [#3390](https://github.com/bytecodealliance/wasmtime/pull/3390) 655 656[RFC 14]: https://github.com/bytecodealliance/rfcs/pull/14 657 658* Cranelift's old x86 backend has been removed, as per [RFC 12]. 659 [#3309](https://github.com/bytecodealliance/wasmtime/pull/3009) 660 661[RFC 12]: https://github.com/bytecodealliance/rfcs/pull/12 662 663## 0.30.0 664 665Released 2021-09-17. 666 667### Security Fixes 668 669* [CVE-2021-39216](https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-v4cp-h94r-m7xf): 670 Fixed a use after free passing `externref`s to Wasm in Wasmtime. 671 672* [CVE-2021-39218](https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-4873-36h9-wv49): 673 Fixed an out-of-bounds read/write and invalid free with `externref`s and GC 674 safepoints in Wasmtime. 675 676* [CVE-2021-39219](https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-q879-9g95-56mx): 677 Fixed a bug where using two different `Engine`s with the same `Linker`-define 678 functions caused unsafety without `unsafe` blocks. 679 680### Added 681 682* Added experimental support for the in-progress 64-bit memories Wasm proposal. 683 684* Added support to build Wasmtime without the compiler. This lets you run 685 pre-compiled Wasm modules, without the ability (or potential attack surface) 686 of compiling new Wasm modules. The compilation functionality is gated by the 687 on-by-default `cranelift` cargo feature. 688 689* Added support for NaN canonicalization with SIMD vectors. 690 691* Added support for differential fuzzing against V8's Wasm engine. 692 693* Added support for fuzzing against the Wasm spec interpreter. 694 695* Enabled SIMD fuzzing on oss-fuzz. 696 697### Changed 698 699* A variety of performance improvements to loading pre-compiled modules. 700 701* A variety of performance improvements to function calls, both through Rust and 702 the C API. 703 704* Leaf functions that do not use the stack no longer bump the frame pointer on 705 aarch64 and s390x. 706 707* Many updates and expanded instruction support to the in-progress CLIF 708 interpreter. 709 710* Expanded fuzzing of reference types and GC. 711 712### Fixed 713 714* A number of fixes to both aarch64 and x86_64 support for the Wasm SIMD 715 proposal and the underlying CLIF vector instructions. 716 717* Fixed a potential infinite loop in the SSA computation for 718 `cranelift-frontend`. This was not reachable from `cranelift-wasm` or 719 Wasmtime, but might have affected general Cranelift users. 720 721### Removed 722 723* The `wasmtime wasm2obj` subcommand has been removed. Generating raw object 724 files for linking natively is no longer supported. Use the `wasmtime compile` 725 subcommand to pre-compile a Wasm module and `wasmtime run` to run pre-compiled 726 Wasm modules. 727 728## 0.29.0 729 730Released 2021-08-02. 731 732### Changed 733 734* Instance exports are now loaded lazily from instances instead of eagerly as 735 they were before. This is an internal-only change and is not a breaking 736 change. 737 [#2984](https://github.com/bytecodealliance/wasmtime/pull/2984) 738 739* All linear memories created by Wasmtime will now, by default, have guard pages 740 in front of them in addition to after them. This is intended to help mitigate 741 future bugs in Cranelift, should they arise. 742 [#2977](https://github.com/bytecodealliance/wasmtime/pull/2977) 743 744* Linear memories now correctly support a maximum size of 4GB. Previously, the 745 limit field was 32 bits, which did not properly support a full 4GB memory. 746 This update is also a necessary change in preparation for future memory64 747 support. 748 [#3013](https://github.com/bytecodealliance/wasmtime/pull/3013) 749 [#3134](https://github.com/bytecodealliance/wasmtime/pull/3134) 750 751* Injection counts of fuel into a `wasmtime::Store` now uses a u64 instead of a 752 u32. 753 [#3048](https://github.com/bytecodealliance/wasmtime/pull/3048) 754 755### Added 756 757* Support for `i128` has improved in the AArch64 backend. 758 [#2959](https://github.com/bytecodealliance/wasmtime/pull/2959) 759 [#2975](https://github.com/bytecodealliance/wasmtime/pull/2975) 760 [#2985](https://github.com/bytecodealliance/wasmtime/pull/2985) 761 [#2990](https://github.com/bytecodealliance/wasmtime/pull/2990) 762 [#3002](https://github.com/bytecodealliance/wasmtime/pull/3002) 763 [#3004](https://github.com/bytecodealliance/wasmtime/pull/3004) 764 [#3005](https://github.com/bytecodealliance/wasmtime/pull/3005) 765 [#3008](https://github.com/bytecodealliance/wasmtime/pull/3008) 766 [#3027](https://github.com/bytecodealliance/wasmtime/pull/3027) 767 768* The s390x backend now supports z14 and atomics. 769 [#2988](https://github.com/bytecodealliance/wasmtime/pull/2988) 770 [#2991](https://github.com/bytecodealliance/wasmtime/pull/2991) 771 772* The `wasmtime::Linker` type now implements `Clone`. 773 [#2993](https://github.com/bytecodealliance/wasmtime/pull/2993) 774 775* Support for the SIMD proposal on both x86\_64 and AArch64 has improved. On 776 x86\_64, all SIMD opcodes are now supported. 777 [#2997](https://github.com/bytecodealliance/wasmtime/pull/2997) 778 [#3035](https://github.com/bytecodealliance/wasmtime/pull/3035) 779 [#2982](https://github.com/bytecodealliance/wasmtime/pull/2982) 780 [#3084](https://github.com/bytecodealliance/wasmtime/pull/3084) 781 [#3082](https://github.com/bytecodealliance/wasmtime/pull/3082) 782 [#3107](https://github.com/bytecodealliance/wasmtime/pull/3107) 783 [#3105](https://github.com/bytecodealliance/wasmtime/pull/3105) 784 [#3114](https://github.com/bytecodealliance/wasmtime/pull/3114) 785 [#3070](https://github.com/bytecodealliance/wasmtime/pull/3070) 786 [#3126](https://github.com/bytecodealliance/wasmtime/pull/3126) 787 788* A `Trap` can now display its reason without also displaying the backtrace. 789 [#3033](https://github.com/bytecodealliance/wasmtime/pull/3033) 790 791* An initiall fuzzer for CLIF has been added. 792 [#3038](https://github.com/bytecodealliance/wasmtime/pull/3038) 793 794* High-level architecture documentation has been added for Wasmtime. 795 [#3019](https://github.com/bytecodealliance/wasmtime/pull/3019) 796 797* Support for multi-memory can now be configured in Wasmtime's C API. 798 [#3071](https://github.com/bytecodealliance/wasmtime/pull/3071) 799 800* The `wasmtime` crate now supports a `posix-signals-on-macos` feature to force 801 the usage of signals instead of mach ports to handle traps on macOS. 802 [#3063](https://github.com/bytecodealliance/wasmtime/pull/3063) 803 804* Wasmtime's C API now has a `wasmtime_trap_code` function to get the raw trap 805 code, if present, for a trap. 806 [#3086](https://github.com/bytecodealliance/wasmtime/pull/3086) 807 808* Wasmtime's C API now has a `wasmtime_linker_define_func` function to define a 809 store-independent function within a linker. 810 [#3122](https://github.com/bytecodealliance/wasmtime/pull/3122) 811 812* A `wasmtime::Linker::module_async` function was added as the asynchronous 813 counterpart to `wasmtime::Linker::module`. 814 [#3121](https://github.com/bytecodealliance/wasmtime/pull/3121) 815 816### Fixed 817 818* Compiling the `wasmtime` crate into a `dylib` crate type has been fixed. 819 [#3010](https://github.com/bytecodealliance/wasmtime/pull/3010) 820 821* The enter/exit hooks for WebAssembly are now executed for an instance's 822 `start` function, if present. 823 [#3001](https://github.com/bytecodealliance/wasmtime/pull/3001) 824 825* Some WASI functions in `wasi-common` have been fixed for big-endian platforms. 826 [#3016](https://github.com/bytecodealliance/wasmtime/pull/3016) 827 828* Wasmtime no longer erroneously assumes that all custom sections may contain 829 DWARF information, reducing instances of `Trap`'s `Display` implementation 830 providing misleading information to set an env var to get more information. 831 [#3083](https://github.com/bytecodealliance/wasmtime/pull/3083) 832 833* Some issues with parsing DWARF debug information have been fixed. 834 [#3116](https://github.com/bytecodealliance/wasmtime/pull/3116) 835 836## 0.28.0 837 838Released 2021-06-09. 839 840### Changed 841 842* Breaking: Wasmtime's embedding API has been redesigned, as specified in [RFC 843 11]. Rust users can now enjoy easier times with `Send` and `Sync`, and all 844 users can now more clearly manage memory, especially in the C API. Language 845 embeddings have been updated to the new API as well. 846 [#2897](https://github.com/bytecodealliance/wasmtime/pull/2897) 847 848[RFC 11]: https://github.com/bytecodealliance/rfcs/pull/11 849 850### Added 851 852* A new `InstancePre` type, created with `Linker::instantiate_pre`, has been 853 added to perform type-checking of an instance once and reduce the work done 854 for each instantiation of a module: 855 [#2962](https://github.com/bytecodealliance/wasmtime/pull/2962) 856 857* Deserialization of a module can now optionally skip checking the wasmtime 858 version string: 859 [#2945](https://github.com/bytecodealliance/wasmtime/pull/2945) 860 861* A method has been exposed to frontload per-thread initialization costs if the 862 latency of every last wasm call is important: 863 [#2946](https://github.com/bytecodealliance/wasmtime/pull/2946) 864 865* Hooks have been added for entry/exit into wasm code to allow embeddings to 866 track time and other properties about execution in a wasm environment: 867 [#2952](https://github.com/bytecodealliance/wasmtime/pull/2952) 868 869* A [C++ embedding of Wasmtime has been written][cpp]. 870 871[RFC 11]: https://github.com/bytecodealliance/rfcs/pull/11 872[cpp]: https://github.com/bytecodealliance/wasmtime-cpp 873 874### Fixed 875 876* Multiple returns on macOS AArch64 have been fixed: 877 [#2956](https://github.com/bytecodealliance/wasmtime/pull/2956) 878 879## 0.27.0 880 881Released 2021-05-21. 882 883### Security Fixes 884 885* Fixed a security issue in Cranelift's x64 backend that could result in a heap 886 sandbox escape due to an incorrect sign-extension: 887 [#2913](https://github.com/bytecodealliance/wasmtime/issues/2913). 888 889### Added 890 891* Support for IBM z/Archiecture (`s390x`) machines in Cranelift and Wasmtime: 892 [#2836](https://github.com/bytecodealliance/wasmtime/pull/2836), 893 [#2837](https://github.com/bytecodealliance/wasmtime/pull/2837), 894 [#2838](https://github.com/bytecodealliance/wasmtime/pull/2838), 895 [#2843](https://github.com/bytecodealliance/wasmtime/pull/2843), 896 [#2854](https://github.com/bytecodealliance/wasmtime/pull/2854), 897 [#2870](https://github.com/bytecodealliance/wasmtime/pull/2870), 898 [#2871](https://github.com/bytecodealliance/wasmtime/pull/2871), 899 [#2872](https://github.com/bytecodealliance/wasmtime/pull/2872), 900 [#2874](https://github.com/bytecodealliance/wasmtime/pull/2874). 901 902* Improved async support in wasi-common runtime: 903 [#2832](https://github.com/bytecodealliance/wasmtime/pull/2832). 904 905* Added `Store::with_limits`, `StoreLimits`, and `ResourceLimiter` to the 906 Wasmtime API to help with enforcing resource limits at runtime. The 907 `ResourceLimiter` trait can be implemented by custom resource limiters to 908 decide if linear memories or tables can be grown. 909 910* Added `allow-unknown-exports` option for the run command: 911 [#2879](https://github.com/bytecodealliance/wasmtime/pull/2879). 912 913* Added API to notify that a `Store` has moved to a new thread: 914 [#2822](https://github.com/bytecodealliance/wasmtime/pull/2822). 915 916* Documented guidance around using Wasmtime in multithreaded contexts: 917 [#2812](https://github.com/bytecodealliance/wasmtime/pull/2812). 918 In the future, the Wasmtime API will change to allow some of its core types 919 to be Send/Sync; see the in-progress 920 [#2897](https://github.com/bytecodealliance/wasmtime/pull/2897) for details. 921 922* Support calls from native code to multiple-return-value functions: 923 [#2806](https://github.com/bytecodealliance/wasmtime/pull/2806). 924 925### Changed 926 927* Breaking: `Memory::new` has been changed to return `Result` as creating a 928 host memory object is now a fallible operation when the initial size of 929 the memory exceeds the store limits. 930 931### Fixed 932 933* Many instruction selection improvements on x64 and aarch64: 934 [#2819](https://github.com/bytecodealliance/wasmtime/pull/2819), 935 [#2828](https://github.com/bytecodealliance/wasmtime/pull/2828), 936 [#2823](https://github.com/bytecodealliance/wasmtime/pull/2823), 937 [#2862](https://github.com/bytecodealliance/wasmtime/pull/2862), 938 [#2886](https://github.com/bytecodealliance/wasmtime/pull/2886), 939 [#2889](https://github.com/bytecodealliance/wasmtime/pull/2889), 940 [#2905](https://github.com/bytecodealliance/wasmtime/pull/2905). 941 942* Improved performance of Wasmtime runtime substantially: 943 [#2811](https://github.com/bytecodealliance/wasmtime/pull/2811), 944 [#2818](https://github.com/bytecodealliance/wasmtime/pull/2818), 945 [#2821](https://github.com/bytecodealliance/wasmtime/pull/2821), 946 [#2847](https://github.com/bytecodealliance/wasmtime/pull/2847), 947 [#2900](https://github.com/bytecodealliance/wasmtime/pull/2900). 948 949* Fixed WASI issue with file metadata on Windows: 950 [#2884](https://github.com/bytecodealliance/wasmtime/pull/2884). 951 952* Fixed an issue with debug info and an underflowing (trapping) offset: 953 [#2866](https://github.com/bytecodealliance/wasmtime/pull/2866). 954 955* Fixed an issue with unwind information in the old x86 backend: 956 [#2845](https://github.com/bytecodealliance/wasmtime/pull/2845). 957 958* Fixed i32 spilling in x64 backend: 959 [#2840](https://github.com/bytecodealliance/wasmtime/pull/2840). 960 961## 0.26.0 962 963Released 2021-04-05. 964 965### Added 966 967* Added the `wasmtime compile` command to support AOT compilation of Wasm 968 modules. This adds the `Engine::precompile_module` method. Also added the 969 `Config::target` method to change the compilation target of the 970 configuration. This can be used in conjunction with 971 `Engine::precompile_module` to target a different host triple than the 972 current one. 973 [#2791](https://github.com/bytecodealliance/wasmtime/pull/2791) 974 975* Support for macOS on aarch64 (Apple M1 Silicon), including Apple-specific 976 calling convention details and unwinding/exception handling using Mach ports. 977 [#2742](https://github.com/bytecodealliance/wasmtime/pull/2742), 978 [#2723](https://github.com/bytecodealliance/wasmtime/pull/2723) 979 980* A number of SIMD instruction implementations in the new x86-64 backend. 981 [#2771](https://github.com/bytecodealliance/wasmtime/pull/2771) 982 983* Added the `Config::cranelift_flag_enable` method to enable setting Cranelift 984 boolean flags or presets in a config. 985 986* Added CLI option `--cranelift-enable` to enable boolean settings and ISA presets. 987 988* Deduplicate function signatures in Wasm modules. 989 [#2772](https://github.com/bytecodealliance/wasmtime/pull/2772) 990 991* Optimize overheads of calling into Wasm functions. 992 [#2757](https://github.com/bytecodealliance/wasmtime/pull/2757), 993 [#2759](https://github.com/bytecodealliance/wasmtime/pull/2759) 994 995* Improvements related to Module Linking: compile fewer trampolines; 996 997 [#2774](https://github.com/bytecodealliance/wasmtime/pull/2774) 998 999* Re-export sibling crates from `wasmtime-wasi` to make embedding easier 1000 without needing to match crate versions. 1001 [#2776](https://github.com/bytecodealliance/wasmtime/pull/2776) 1002 1003### Changed 1004 1005* Switched the default compiler backend on x86-64 to Cranelift's new backend. 1006 This should not have any user-visible effects other than possibly runtime 1007 performance improvements. The old backend is still available with the 1008 `old-x86-backend` feature flag to the `cranelift-codegen` or `wasmtime` 1009 crates, or programmatically with `BackendVariant::Legacy`. We plan to 1010 maintain the old backend for at least one more release and ensure it works on 1011 CI. 1012 [#2718](https://github.com/bytecodealliance/wasmtime/pull/2718) 1013 1014* Breaking: `Module::deserialize` has been removed in favor of `Module::new`. 1015 1016* Breaking: `Config::cranelift_clear_cpu_flags` was removed. Use `Config::target` 1017 to clear the CPU flags for the host's target. 1018 1019* Breaking: `Config::cranelift_other_flag` was renamed to `Config::cranelift_flag_set`. 1020 1021* CLI changes: 1022 * Wasmtime CLI options to enable WebAssembly features have been replaced with 1023 a singular `--wasm-features` option. The previous options are still 1024 supported, but are not displayed in help text. 1025 * Breaking: the CLI option `--cranelift-flags` was changed to 1026 `--cranelift-set`. 1027 * Breaking: the CLI option `--enable-reference-types=false` has been changed 1028 to `--wasm-features=-reference-types`. 1029 * Breaking: the CLI option `--enable-multi-value=false` has been changed to 1030 `--wasm-features=-multi-value`. 1031 * Breaking: the CLI option `--enable-bulk-memory=false` has been changed to 1032 `--wasm-features=-bulk-memory`. 1033 1034* Improved error-reporting in wiggle. 1035 [#2760](https://github.com/bytecodealliance/wasmtime/pull/2760) 1036 1037* Make WASI sleeping fallible (some systems do not support sleep). 1038 [#2756](https://github.com/bytecodealliance/wasmtime/pull/2756) 1039 1040* WASI: Support `poll_oneoff` with a sleep. 1041 [#2753](https://github.com/bytecodealliance/wasmtime/pull/2753) 1042 1043* Allow a `StackMapSink` to be passed when defining functions with 1044 `cranelift-module`. 1045 [#2739](https://github.com/bytecodealliance/wasmtime/pull/2739) 1046 1047* Some refactoring in new x86-64 backend to prepare for VEX/EVEX (e.g., 1048 AVX-512) instruction encodings to be supported. 1049 [#2799](https://github.com/bytecodealliance/wasmtime/pull/2799) 1050 1051### Fixed 1052 1053* Fixed a corner case in `srem` (signed remainder) in the new x86-64 backend: 1054 `INT_MIN % -1` should return `0`, rather than trapping. This only occurred 1055 when `avoid_div_traps == false` was set by the embedding. 1056 [#2763](https://github.com/bytecodealliance/wasmtime/pull/2763) 1057 1058* Fixed a memory leak of the `Store` when an instance traps. 1059 [#2803](https://github.com/bytecodealliance/wasmtime/pull/2803) 1060 1061* Some fuzzing-related fixes. 1062 [#2788](https://github.com/bytecodealliance/wasmtime/pull/2788), 1063 [#2770](https://github.com/bytecodealliance/wasmtime/pull/2770) 1064 1065* Fixed memory-initialization bug in uffd allocator that could copy into the 1066 wrong destination under certain conditions. Does not affect the default 1067 wasmtime instance allocator. 1068 [#2801](https://github.com/bytecodealliance/wasmtime/pull/2801) 1069 1070* Fix printing of float values from the Wasmtime CLI. 1071 [#2797](https://github.com/bytecodealliance/wasmtime/pull/2797) 1072 1073* Remove the ability for the `Linker` to instantiate modules with duplicate 1074 import strings of different types. 1075 [#2789](https://github.com/bytecodealliance/wasmtime/pull/2789) 1076 1077## 0.25.0 1078 1079Released 2021-03-16. 1080 1081### Added 1082 1083* An implementation of a pooling instance allocator, optionally backed by 1084 `userfaultfd` on Linux, was added to improve the performance of embeddings 1085 that instantiate a large number of instances continuously. 1086 [#2518](https://github.com/bytecodealliance/wasmtime/pull/2518) 1087 1088* Host functions can now be defined on `Config` to share the function across all 1089 `Store` objects connected to an `Engine`. This can improve the time it takes 1090 to instantiate instances in a short-lived `Store`. 1091 [#2625](https://github.com/bytecodealliance/wasmtime/pull/2625) 1092 1093* The `Store` object now supports having typed values attached to it which can 1094 be retrieved from host functions. 1095 [#2625](https://github.com/bytecodealliance/wasmtime/pull/2625) 1096 1097* The `wiggle` code generator now supports `async` host functions. 1098 [#2701](https://github.com/bytecodealliance/wasmtime/pull/2701) 1099 1100### Changed 1101 1102* The `Func::getN{,_async}` APIs have all been removed in favor of a new 1103 `Func::typed` API which should be more compact in terms of API surface area as 1104 well as more flexible in how it can be used. 1105 [#2719](https://github.com/bytecodealliance/wasmtime/pull/2719) 1106 1107* `Engine::new` has been changed from returning `Engine` to returning 1108 `anyhow::Result<Engine>`. Callers of `Engine::new` will need to be updated to 1109 use the `?` operator on the return value or otherwise unwrap the result to get 1110 the `Engine`. 1111 1112### Fixed 1113 1114* Interpretation of timestamps in `poll_oneoff` for WASI have been fixed to 1115 correctly use nanoseconds instead of microseconds. 1116 [#2717](https://github.com/bytecodealliance/wasmtime/pull/2717) 1117 1118## 0.24.0 1119 1120Released 2021-03-04. 1121 1122### Added 1123 1124* Implement support for `async` functions in Wasmtime 1125 [#2434](https://github.com/bytecodealliance/wasmtime/pull/2434) 1126 1127### Fixed 1128 1129* Fix preservation of the sigaltstack on macOS 1130 [#2676](https://github.com/bytecodealliance/wasmtime/pull/2676) 1131* Fix incorrect semver dependencies involving fs-set-times. 1132 [#2705](https://github.com/bytecodealliance/wasmtime/pull/2705) 1133* Fix some `i128` shift-related bugs in x64 backend. 1134 [#2682](https://github.com/bytecodealliance/wasmtime/pull/2682) 1135* Fix incomplete trap metadata due to multiple traps at one address 1136 [#2685](https://github.com/bytecodealliance/wasmtime/pull/2685) 1137 1138## 0.23.0 1139 1140Released 2021-02-16. 1141 1142### Added 1143 1144* Support for limiting WebAssembly execution with fuel was added, including 1145 support in the C API. 1146 [#2611](https://github.com/bytecodealliance/wasmtime/pull/2611) 1147 [#2643](https://github.com/bytecodealliance/wasmtime/pull/2643) 1148* Wasmtime now has more knobs for limiting memory and table allocations 1149 [#2617](https://github.com/bytecodealliance/wasmtime/pull/2617) 1150* Added a method to share `Config` across machines 1151 [#2608](https://github.com/bytecodealliance/wasmtime/pull/2608) 1152* Added a safe memory read/write API 1153 [#2528](https://github.com/bytecodealliance/wasmtime/pull/2528) 1154* Added support for the experimental wasi-crypto APIs 1155 [#2597](https://github.com/bytecodealliance/wasmtime/pull/2597) 1156* Added an instance limit to `Config` 1157 [#2593](https://github.com/bytecodealliance/wasmtime/pull/2593) 1158* Implemented module-linking's outer module aliases 1159 [#2590](https://github.com/bytecodealliance/wasmtime/pull/2590) 1160* Cranelift now supports 128-bit operations for the new x64 backend. 1161 [#2539](https://github.com/bytecodealliance/wasmtime/pull/2539) 1162* Cranelift now has detailed debug-info (DWARF) support in new backends (initially x64). 1163 [#2565](https://github.com/bytecodealliance/wasmtime/pull/2565) 1164* Cranelift now uses the `POPCNT`, `TZCNT`, and `LZCNT`, as well as SSE 4.1 1165 rounding instructions on x64 when available. 1166* Cranelift now uses the `CNT`, instruction on aarch64 when available. 1167 1168### Changed 1169 1170* A new WASI implementation built on the new 1171 [`cap-std`](https://github.com/bytecodealliance/cap-std) crate was added, 1172 replacing the previous implementation. This brings improved robustness, 1173 portability, and performance. 1174 1175* `wasmtime_wasi::WasiCtxBuilder` moved to 1176 `wasi_cap_std_sync::WasiCtxBuilder`. 1177 1178* The WebAssembly C API is updated, with a few minor API changes 1179 [#2579](https://github.com/bytecodealliance/wasmtime/pull/2579) 1180 1181### Fixed 1182 1183* Fixed a panic in WASI `fd_readdir` on large directories 1184 [#2620](https://github.com/bytecodealliance/wasmtime/pull/2620) 1185* Fixed a memory leak with command modules 1186 [#2017](https://github.com/bytecodealliance/wasmtime/pull/2017) 1187 1188-------------------------------------------------------------------------------- 1189 1190## 0.22.0 1191 1192Released 2021-01-07. 1193 1194### Added 1195 1196* Experimental support for [the module-linking 1197 proposal](https://github.com/WebAssembly/module-linking) was 1198 added. [#2094](https://github.com/bytecodealliance/wasmtime/pull/2094) 1199 1200* Added support for [the reference types 1201 proposal](https://webassembly.github.io/reference-types) on the aarch64 1202 architecture. [#2410](https://github.com/bytecodealliance/wasmtime/pull/2410) 1203 1204* Experimental support for [wasi-nn](https://github.com/WebAssembly/wasi-nn) was 1205 added. [#2208](https://github.com/bytecodealliance/wasmtime/pull/2208) 1206 1207### Changed 1208 1209### Fixed 1210 1211* Fixed an issue where the `select` instruction didn't accept `v128` SIMD 1212 operands. [#2391](https://github.com/bytecodealliance/wasmtime/pull/2391) 1213 1214* Fixed an issue where Wasmtime could potentially use the wrong stack map during 1215 GCs, leading to a 1216 panic. [#2396](https://github.com/bytecodealliance/wasmtime/pull/2396) 1217 1218* Fixed an issue where if a host-defined function erroneously returned a value 1219 from a different store, that value would be 1220 leaked. [#2424](https://github.com/bytecodealliance/wasmtime/pull/2424) 1221 1222* Fixed a bug where in certain cases if a module's instantiation failed, it 1223 could leave trampolines in the store that referenced the no-longer-valid 1224 instance. These trampolines could be reused in future instantiations, leading 1225 to use after free bugs. 1226 [#2408](https://github.com/bytecodealliance/wasmtime/pull/2408) 1227 1228* Fixed a miscompilation on aarch64 where certain instructions would read `SP` 1229 instead of the zero register. This could only affect you if you explicitly 1230 enabled the Wasm SIMD 1231 proposal. [#2548](https://github.com/bytecodealliance/wasmtime/pull/2548) 1232 1233-------------------------------------------------------------------------------- 1234 1235## 0.21.0 1236 1237Released 2020-11-05. 1238 1239### Added 1240 1241* Experimental support for the multi-memory proposal was added. 1242 [#2263](https://github.com/bytecodealliance/wasmtime/pull/2263) 1243 1244* The `Trap::trap_code` API enables learning what kind of trap was raised. 1245 [#2309](https://github.com/bytecodealliance/wasmtime/pull/2309) 1246 1247### Changed 1248 1249* WebAssembly module validation is now parallelized. 1250 [#2059](https://github.com/bytecodealliance/wasmtime/pull/2059) 1251 1252* Documentation is now available at docs.wasmtime.dev. 1253 [#2317](https://github.com/bytecodealliance/wasmtime/pull/2317) 1254 1255* Windows now compiles like other platforms with a huge guard page instead of 1256 having its own custom limit which made modules compile and run more slowly. 1257 [#2326](https://github.com/bytecodealliance/wasmtime/pull/2326) 1258 1259* The size of the cache entry for serialized modules has been greatly reduced. 1260 [#2321](https://github.com/bytecodealliance/wasmtime/pull/2321) 1261 [#2322](https://github.com/bytecodealliance/wasmtime/pull/2322) 1262 [#2324](https://github.com/bytecodealliance/wasmtime/pull/2324) 1263 [#2325](https://github.com/bytecodealliance/wasmtime/pull/2325) 1264 1265* The `FuncType` API constructor and accessors are now iterator-based. 1266 [#2365](https://github.com/bytecodealliance/wasmtime/pull/2365) 1267 1268### Fixed 1269 1270* A panic in compiling reference-types-using modules has been fixed. 1271 [#2350](https://github.com/bytecodealliance/wasmtime/pull/2350) 1272 1273-------------------------------------------------------------------------------- 1274 1275## 0.20.0 1276 1277Released 2020-09-23. 1278 1279### Added 1280 1281* Support for explicitly serializing and deserializing compiled wasm modules has 1282 been added. 1283 [#2020](https://github.com/bytecodealliance/wasmtime/pull/2020) 1284 1285* A `wasmtime_store_gc` C API was added to run GC for `externref`. 1286 [#2052](https://github.com/bytecodealliance/wasmtime/pull/2052) 1287 1288* Support for atomics in Cranelift has been added. Support is not fully 1289 implemented in Wasmtime at this time, however. 1290 [#2077](https://github.com/bytecodealliance/wasmtime/pull/2077) 1291 1292* The `Caller::get_export` function is now implemented for `Func` references as 1293 well. 1294 [#2108](https://github.com/bytecodealliance/wasmtime/pull/2108) 1295 1296### Fixed 1297 1298* Leaks in the C API have been fixed. 1299 [#2040](https://github.com/bytecodealliance/wasmtime/pull/2040) 1300 1301* The `wasm_val_copy` C API has been fixed for reference types. 1302 [#2041](https://github.com/bytecodealliance/wasmtime/pull/2041) 1303 1304* Fix a panic with `Func::new` and reference types when the store doesn't have 1305 reference types enabled. 1306 [#2039](https://github.com/bytecodealliance/wasmtime/pull/2039) 1307 1308-------------------------------------------------------------------------------- 1309 1310## 0.19.0 1311 1312Released 2020-07-14. 1313 1314### Added 1315 1316* The [WebAssembly reference-types proposal][reftypes] is now supported in 1317 Wasmtime and the C API. 1318 [#1832](https://github.com/bytecodealliance/wasmtime/pull/1832), 1319 [#1882](https://github.com/bytecodealliance/wasmtime/pull/1882), 1320 [#1894](https://github.com/bytecodealliance/wasmtime/pull/1894), 1321 [#1901](https://github.com/bytecodealliance/wasmtime/pull/1901), 1322 [#1923](https://github.com/bytecodealliance/wasmtime/pull/1923), 1323 [#1969](https://github.com/bytecodealliance/wasmtime/pull/1969), 1324 [#1973](https://github.com/bytecodealliance/wasmtime/pull/1973), 1325 [#1982](https://github.com/bytecodealliance/wasmtime/pull/1982), 1326 [#1984](https://github.com/bytecodealliance/wasmtime/pull/1984), 1327 [#1991](https://github.com/bytecodealliance/wasmtime/pull/1991), 1328 [#1996](https://github.com/bytecodealliance/wasmtime/pull/1996) 1329 1330* The [WebAssembly simd proposal's][simd] spec tests now pass in Wasmtime. 1331 [#1765](https://github.com/bytecodealliance/wasmtime/pull/1765), 1332 [#1876](https://github.com/bytecodealliance/wasmtime/pull/1876), 1333 [#1941](https://github.com/bytecodealliance/wasmtime/pull/1941), 1334 [#1957](https://github.com/bytecodealliance/wasmtime/pull/1957), 1335 [#1990](https://github.com/bytecodealliance/wasmtime/pull/1990), 1336 [#1994](https://github.com/bytecodealliance/wasmtime/pull/1994) 1337 1338* Wasmtime can now be compiled without the usage of threads for parallel 1339 compilation, although this is still enabled by default. 1340 [#1903](https://github.com/bytecodealliance/wasmtime/pull/1903) 1341 1342* The C API is [now 1343 documented](https://bytecodealliance.github.io/wasmtime/c-api/). 1344 [#1928](https://github.com/bytecodealliance/wasmtime/pull/1928), 1345 [#1959](https://github.com/bytecodealliance/wasmtime/pull/1959), 1346 [#1968](https://github.com/bytecodealliance/wasmtime/pull/1968) 1347 1348* A `wasmtime_linker_get_one_by_name` function was added to the C API. 1349 [#1897](https://github.com/bytecodealliance/wasmtime/pull/1897) 1350 1351* A `wasmtime_trap_exit_status` function was added to the C API. 1352 [#1912](https://github.com/bytecodealliance/wasmtime/pull/1912) 1353 1354* Compilation for the `aarch64-linux-android` target should now work, although 1355 keep in mind this platform is not fully tested still. 1356 [#2002](https://github.com/bytecodealliance/wasmtime/pull/2002) 1357 1358[reftypes]: https://github.com/WebAssembly/reference-types 1359 1360### Fixed 1361 1362* Runtime warnings when using Wasmtime on musl have been fixed. 1363 [#1914](https://github.com/bytecodealliance/wasmtime/pull/1914) 1364 1365* A bug affecting Windows unwind information with functions that have spilled 1366 floating point registers has been fixed. 1367 [#1983](https://github.com/bytecodealliance/wasmtime/pull/1983) 1368 1369### Changed 1370 1371* Wasmtime's default branch and development now happens on the `main` branch 1372 instead of `master`. 1373 [#1924](https://github.com/bytecodealliance/wasmtime/pull/1924) 1374 1375### Removed 1376 1377* The "host info" support in the C API has been removed since it was never fully 1378 or correctly implemented. 1379 [#1922](https://github.com/bytecodealliance/wasmtime/pull/1922) 1380 1381* Support for the `*_same` functions in the C API has been removed in the same 1382 vein as the host info APIs. 1383 [#1926](https://github.com/bytecodealliance/wasmtime/pull/1926) 1384 1385-------------------------------------------------------------------------------- 1386 1387## 0.18.0 1388 1389Release 2020-06-09. 1390 1391### Added 1392 1393The `WasmTy` trait is now implemented for `u32` and `u64`. 1394 1395 [#1808](https://github.com/bytecodealliance/wasmtime/pull/1808) 1396 1397-------------------------------------------------------------------------------- 1398 1399## 0.17.0 1400 1401Released 2020-06-01. 1402 1403### Added 1404 1405* The [Commands and Reactors ABI] is now supported in the Rust API. `Linker::module` 1406 loads a module and automatically handles Commands and Reactors semantics. 1407 1408 [#1565](https://github.com/bytecodealliance/wasmtime/pull/1565) 1409 1410[Commands and Reactors ABI]: https://github.com/WebAssembly/WASI/blob/master/design/application-abi.md#current-unstable-abi 1411 1412The `Table::grow` function now returns the previous table size, making it consistent 1413with the `table.grow` instruction. 1414 1415 [#1653](https://github.com/bytecodealliance/wasmtime/pull/1653) 1416 1417New Wasmtime-specific C APIs for working with tables were added which provide more 1418detailed error information and which make growing a table more consistent with the 1419`table.grow` instruction as well. 1420 1421 [#1654](https://github.com/bytecodealliance/wasmtime/pull/1654) 1422 1423The C API now includes support for enabling logging in Wasmtime. 1424 1425 [#1737](https://github.com/bytecodealliance/wasmtime/pull/1737) 1426 1427### Changed 1428 1429The WASI `proc_exit` function no longer exits the host process. It now unwinds the 1430callstack back to the wasm entrypoint, and the exit value is available from the 1431`Trap::i32_exit_status` method. 1432 1433 [#1646](https://github.com/bytecodealliance/wasmtime/pull/1646) 1434 1435The WebAssembly [multi-value](https://github.com/WebAssembly/multi-value/) proposal 1436is now enabled by default. 1437 1438 [#1667](https://github.com/bytecodealliance/wasmtime/pull/1667) 1439 1440The Rust API does not require a store provided during `Module::new` operation. The `Module` can be send accross threads and instantiate for a specific store. The `Instance::new` now requires the store. 1441 1442 [#1761](https://github.com/bytecodealliance/wasmtime/pull/1761) 1443 1444-------------------------------------------------------------------------------- 1445 1446## 0.16.0 1447 1448Released 2020-04-29. 1449 1450### Added 1451 1452* The `Instance` struct has new accessors, `get_func`, `get_table`, 1453 `get_memory`, and `get_global` for quickly looking up exported 1454 functions, tables, memories, and globals by name. 1455 [#1524](https://github.com/bytecodealliance/wasmtime/pull/1524) 1456 1457* The C API has a number of new `wasmtime_*` functions which return error 1458 objects to get detailed error information when an API fails. 1459 [#1467](https://github.com/bytecodealliance/wasmtime/pull/1467) 1460 1461* Users now have fine-grained control over creation of instances of `Memory` 1462 with a new `MemoryCreator` trait. 1463 [#1400](https://github.com/bytecodealliance/wasmtime/pull/1400) 1464 1465* Go bindings for Wasmtime are [now available][go-bindings]. 1466 [#1481](https://github.com/bytecodealliance/wasmtime/pull/1481) 1467 1468* APIs for looking up values in a `Linker` have been added. 1469 [#1480](https://github.com/bytecodealliance/wasmtime/pull/1480) 1470 1471* Preliminary support for AArch64, also known as ARM64. 1472 [#1581](https://github.com/bytecodealliance/wasmtime/pull/1581) 1473 1474[go-bindings]: https://github.com/bytecodealliance/wasmtime-go 1475 1476### Changed 1477 1478* `Instance::exports` now returns `Export` objects which contain 1479 the `name`s of the exports in addition to their `Extern` definitions, 1480 so it's no longer necessary to use `Module::exports` to obtain the 1481 export names. 1482 [#1524](https://github.com/bytecodealliance/wasmtime/pull/1524) 1483 1484* The `Func::call` API has changed its error type from `Trap` to `anyhow::Error` 1485 to distinguish between wasm traps and runtime violations (like the wrong 1486 number of parameters). 1487 [#1467](https://github.com/bytecodealliance/wasmtime/pull/1467) 1488 1489* A number of `wasmtime_linker_*` and `wasmtime_config_*` C APIs have new type 1490 signatures which reflect returning errors. 1491 [#1467](https://github.com/bytecodealliance/wasmtime/pull/1467) 1492 1493* Bindings for .NET have moved to 1494 https://github.com/bytecodealliance/wasmtime-dotnet. 1495 [#1477](https://github.com/bytecodealliance/wasmtime/pull/1477) 1496 1497* Passing too many imports to `Instance::new` is now considered an error. 1498 [#1478](https://github.com/bytecodealliance/wasmtime/pull/1478) 1499 1500### Fixed 1501 1502* Spurious segfaults due to out-of-stack conditions when handling signals have 1503 been fixed. 1504 [#1315](https://github.com/bytecodealliance/wasmtime/pull/1315) 1505 1506-------------------------------------------------------------------------------- 1507 1508## 0.15.0 1509 1510Released 2020-03-31. 1511 1512### Fixed 1513 1514Full release produced for all artifacts to account for hiccups in 0.13.0 and 15150.14.0. 1516 1517-------------------------------------------------------------------------------- 1518 1519## 0.14.0 1520 1521*This version ended up not getting a full release* 1522 1523### Fixed 1524 1525Fix build errors in wasi-common on Windows. 1526 1527-------------------------------------------------------------------------------- 1528 1529## 0.13.0 1530 1531Released 2020-03-24. 1532 1533### Added 1534 1535* Lots of documentation of `wasmtime` has been updated. Be sure to check out the 1536 [book](https://bytecodealliance.github.io/wasmtime/) and [API 1537 documentation](https://bytecodealliance.github.io/wasmtime/api/wasmtime/)! 1538 1539* All wasmtime example programs are now in a top-level `examples` directory and 1540 are available in both C and Rust. 1541 [#1286](https://github.com/bytecodealliance/wasmtime/pull/1286) 1542 1543* A `wasmtime::Linker` type was added to conveniently link link wasm modules 1544 together and create instances that reference one another. 1545 [#1384](https://github.com/bytecodealliance/wasmtime/pull/1384) 1546 1547* Wasmtime now has "jitdump" support enabled by default which allows [profiling 1548 wasm code on linux][jitdump]. 1549 [#1310](https://github.com/bytecodealliance/wasmtime/pull/1310) 1550 1551* The `wasmtime::Caller` type now exists as a first-class way to access the 1552 caller's exports, namely memory, when implementing host APIs. This can be the 1553 first argument of functions defined with `Func::new` or `Func::wrap` which 1554 allows easily implementing methods which take a pointer into wasm memory. Note 1555 that this only works for accessing the caller's `Memory` for now and it must 1556 be exported. This will eventually be replaced with a more general-purpose 1557 mechanism like interface types. 1558 [#1290](https://github.com/bytecodealliance/wasmtime/pull/1290) 1559 1560* The bulk memory proposal has been fully implemented. 1561 [#1264](https://github.com/bytecodealliance/wasmtime/pull/1264) 1562 [#976](https://github.com/bytecodealliance/wasmtime/pull/976) 1563 1564* Virtual file support has been added to `wasi-common`. 1565 [#701](https://github.com/bytecodealliance/wasmtime/pull/701) 1566 1567* The C API has been enhanced with a Wasmtime-specific `wasmtime_wat2wasm` to 1568 parse `*.wat` files via the C API. 1569 [#1206](https://github.com/bytecodealliance/wasmtime/pull/1206) 1570 1571[jitdump]: https://bytecodealliance.github.io/wasmtime/examples-profiling.html 1572 1573### Changed 1574 1575* The `wast` and `wasm2obj` standalone binaries have been removed. They're 1576 available via the `wasmtime wast` and `wasmtime wasm2obj` subcommands. 1577 [#1372](https://github.com/bytecodealliance/wasmtime/pull/1372) 1578 1579* The `wasi-common` crate now uses the new `wiggle` crate to auto-generate a 1580 trait which is implemented for the current wasi snapshot. 1581 [#1202](https://github.com/bytecodealliance/wasmtime/pull/1202) 1582 1583* Wasmtime no longer has a dependency on a C++ compiler. 1584 [#1365](https://github.com/bytecodealliance/wasmtime/pull/1365) 1585 1586* The `Func::wrapN` APIs have been consolidated into one `Func::wrap` API. 1587 [#1363](https://github.com/bytecodealliance/wasmtime/pull/1363) 1588 1589* The `Callable` trait has been removed and now `Func::new` takes a closure 1590 directly. 1591 [#1363](https://github.com/bytecodealliance/wasmtime/pull/1363) 1592 1593* The Cranelift repository has been merged into the Wasmtime repository. 1594 1595* Support for interface types has been temporarily removed. 1596 [#1292](https://github.com/bytecodealliance/wasmtime/pull/1292) 1597 1598* The exit code of the `wasmtime` CLI has changed if the program traps. 1599 [#1274](https://github.com/bytecodealliance/wasmtime/pull/1274) 1600 1601* The `wasmtime` CLI now logs to stderr by default and the `-d` flag has been 1602 renamed to `--log-to-file`. 1603 [#1266](https://github.com/bytecodealliance/wasmtime/pull/1266) 1604 1605* Values cannot cross `Store` objects, meaning you can't instantiate a module 1606 with values from different stores nor pass values from different stores into 1607 methods. 1608 [#1016](https://github.com/bytecodealliance/wasmtime/pull/1016) 1609 1610-------------------------------------------------------------------------------- 1611 1612## 0.12.0 1613 1614Released 2020-02-26. 1615 1616### Added 1617 1618* Support for the [WebAssembly text annotations proposal][annotations-proposal] 1619 has been added. 1620 [#998](https://github.com/bytecodealliance/wasmtime/pull/998) 1621 1622* An initial C API for instantiating WASI modules has been added. 1623 [#977](https://github.com/bytecodealliance/wasmtime/pull/977) 1624 1625* A new suite of `Func::getN` functions have been added to the `wasmtime` API to 1626 call statically-known function signatures in a highly optimized fashion. 1627 [#955](https://github.com/bytecodealliance/wasmtime/pull/955) 1628 1629* Initial support for profiling JIT code through perf jitdump has been added. 1630 [#360](https://github.com/bytecodealliance/wasmtime/pull/360) 1631 1632* More CLI flags corresponding to proposed WebAssembly features have been added. 1633 [#917](https://github.com/bytecodealliance/wasmtime/pull/917) 1634 1635[annotations-proposal]: https://github.com/webassembly/annotations 1636 1637### Changed 1638 1639* The `wasmtime` CLI as well as embedding API will optimize WebAssembly code by 1640 default now. 1641 [#973](https://github.com/bytecodealliance/wasmtime/pull/973) 1642 [#988](https://github.com/bytecodealliance/wasmtime/pull/988) 1643 1644* The `verifier` pass in Cranelift is now no longer run by default when using 1645 the embedding API. 1646 [#882](https://github.com/bytecodealliance/wasmtime/pull/882) 1647 1648### Fixed 1649 1650* Code caching now accurately accounts for optimization levels, ensuring that if 1651 you ask for optimized code you're not accidentally handed unoptimized code 1652 from the cache. 1653 [#974](https://github.com/bytecodealliance/wasmtime/pull/974) 1654 1655* Automated releases for tags should be up and running again, along with 1656 automatic publication of the `wasmtime` Python package. 1657 [#971](https://github.com/bytecodealliance/wasmtime/pull/971) 1658