sqlite/ext/wasm/version-json.c
stephan 8ffc98999d JS: add build-time-generated version info to the sqlite3.version object. Remove some stray debug output from tester1.js.
FossilOrigin-Name: b5f462c2d85d503f6492ec20580d57cb4c926712f6306a6be764bd09d1f5e8b8
2022-10-16 16:38:15 +00:00

27 lines
859 B
C

/*
** 2022-10-16
**
** The author disclaims copyright to this source code. In place of a
** legal notice, here is a blessing:
**
** * May you do good and not evil.
** * May you find forgiveness for yourself and forgive others.
** * May you share freely, never taking more than you give.
**
*************************************************************************
** This file simply outputs sqlite3 version information in JSON form,
** intended for embedding in the sqlite3 JS API build.
*/
#include <stdio.h>
#include "sqlite3.h"
int main(int argc, char const * const * argv){
if(argc || argv){/*unused*/}
printf("{\"libVersion\": \"%s\", "
"\"libVersionNumber\": %d, "
"\"sourceId\": \"%s\"}"/*missing newline is intentional*/,
SQLITE_VERSION,
SQLITE_VERSION_NUMBER,
SQLITE_SOURCE_ID);
return 0;
}