Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider introducing wasmtime specific header for the library distribution #986

Closed
rene-fonseca opened this issue Feb 25, 2020 · 4 comments
Labels
enhancement wasmtime:c-api Issues pertaining to the C API.

Comments

@rene-fonseca
Copy link

It would be nice to have version/compatibility info available via a header when consuming the wasmtime library. I use such version defines to automatically tag the the binaries built (e.g. allows future security issues to be detected automatically).

E.g. look at ZLIB library header for useful info.

#define ZLIB_VERSION "1.2.11"
#define ZLIB_VERNUM 0x12b0
#define ZLIB_VER_MAJOR 1
#define ZLIB_VER_MINOR 2
#define ZLIB_VER_REVISION 11
#define ZLIB_VER_SUBREVISION 0

I then consume info at compile time like this:
https://github.com/rene-fonseca/base/blob/9d478d34a6ac3b1661b781a97dd8c90610ae5428/base/compression/ZLibInflater.cpp#L65-L67

@yurydelendik
Copy link
Contributor

Is this issue limited only to C API packages?

@yurydelendik yurydelendik added wasmtime:c-api Issues pertaining to the C API. enhancement labels Feb 25, 2020
@rene-fonseca
Copy link
Author

Not sure how non-C environments work. Maybe info could be available to C#/Rust too.

But I was thinking about C-API. But not specific to WASI C-API - since it is really the runtime info I'm looking for here - ie. the wasmtime implementation.

@plicease
Copy link
Contributor

For FFI it would be helpful to have a wasmtime_version() function for diagnostics that returned a string with the wasmtime version for taged releases, and the git commit id for dev releases.

Adding this information as #defines to the header is useful for C/C++, but not for languages that use FFI based on libffi or similar.

@bjorn3
Copy link
Contributor

bjorn3 commented Feb 9, 2023

I think this is a duplicate of #5635 which was fixed in #5651.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement wasmtime:c-api Issues pertaining to the C API.
Projects
None yet
Development

No branches or pull requests

5 participants