I've got REST service written in C++/Qt 5.15.x. Under some URL REST service sends WASM stuff. It's a GUI application (REST client) written in C++/Qt 5.15.x. It is possible to embed some function which shows version etc? I'd like to load wasm on the server side (Debian) in "bla-bla.wasm --version" style. Or call some function from wasm via native REST service.
In fact, REST service detects wasm renewal on the server side and will notify clients about new version via WebSocket.
I am using for similar purpose
git describe
sent through Makefile as compilation definition.In C++ there is a function which reads and parses string initialized with definition from Makefile (using as an input mentioned git output).
Makefile
VERSION="-DVERSION_NUMBER=\"$(shell git describe)\""
C++
std::string version(VERSION_NUMBER);