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