c-api: add Wasmtime version macros to wasmtime.h (#5651)

* Add several `WASMTIME_VERSION_*` macros to `wasmtime.h`.
* Update `scripts/publish.rs`
  * To set these macros as per the new version in `./Cargo.toml` during
    `./publish bump`.
  * To verify the macros match the version in `./Cargo.toml` during
    `./publish verify`.

Fix #5635
This commit is contained in:
Thibault Charbonnier
2023-01-30 06:52:11 -08:00
committed by GitHub
parent 20a216923b
commit e835255fbf
2 changed files with 81 additions and 0 deletions

View File

@@ -196,6 +196,23 @@
#include <wasmtime/trap.h>
#include <wasmtime/val.h>
/**
* \brief Wasmtime version string.
*/
#define WASMTIME_VERSION "6.0.0"
/**
* \brief Wasmtime major version number.
*/
#define WASMTIME_VERSION_MAJOR 6
/**
* \brief Wasmtime minor version number.
*/
#define WASMTIME_VERSION_MINOR 0
/**
* \brief Wasmtime patch version number.
*/
#define WASMTIME_VERSION_PATCH 0
#ifdef __cplusplus
extern "C" {
#endif