aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/version-info.c
diff options
context:
space:
mode:
authordrh <>2022-10-17 16:31:55 +0000
committerdrh <>2022-10-17 16:31:55 +0000
commit79b99b09fa92d65d3ad065731e9f6392300bc120 (patch)
tree1a98cddf2149d83067573badc5bb8739a09a5524 /ext/wasm/version-info.c
parente70d458340146bf20cc48224b8ddd9a18120d3c0 (diff)
parent8be89249012a556580737d9e7a6b1938bab9e02c (diff)
downloadsqlite-79b99b09fa92d65d3ad065731e9f6392300bc120.tar.gz
sqlite-79b99b09fa92d65d3ad065731e9f6392300bc120.zip
Merge trunk changes into the index-expr-opt branch.
FossilOrigin-Name: a1485ce6c8374135290eb0a1e4eb4e225497ad7096847a4e2377c9c054946ca7
Diffstat (limited to 'ext/wasm/version-info.c')
-rw-r--r--ext/wasm/version-info.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/wasm/version-info.c b/ext/wasm/version-info.c
new file mode 100644
index 000000000..cb5083a40
--- /dev/null
+++ b/ext/wasm/version-info.c
@@ -0,0 +1,26 @@
+/*
+** 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;
+}