Stream: git-wasmtime

Topic: wasmtime / issue #5635 Adding versionning macros to the C...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 25 2023 at 19:29):

thibaultcha opened issue #5635:

Feature

Could we add versioning macros to the C API in wasmtime.h?

Benefit

As our embedder program can be linked against several Wasm runtimes, we wish to add compilation guards ensuring the version of these runtimes is either tested or compatible with the targets chosen by our users; without them having to face numerous compilation errors or more obscure behavior when it is not the case.

E.g.

#if WASMTIME_VERSION_MAJOR != 5
#error Unsupported Wasmtime version detected, please use Wasmtime 5.x.y
#endif

Implementation

E.g.

// wasmtime.h
#define WASMTIME_VERSION "5.0.0"
#define WASMTIME_VERSION_MAJOR 5
#define WASMTIME_VERSION_MINOR 0
#define WASMTIME_VERSION_PATCH 0

Alternatives

N/A


Last updated: Dec 23 2024 at 12:05 UTC