-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Adding Custom Extensions to sql.js #459
Comments
maybe delete the diff --git a/Makefile b/Makefile
index 9aeed3b..2038f86 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,6 @@ EMCC=emcc
CFLAGS = \
-O2 \
- -DSQLITE_OMIT_LOAD_EXTENSION \
-DSQLITE_DISABLE_LFS \
-DSQLITE_ENABLE_FTS3 \
-DSQLITE_ENABLE_FTS3_PARENTHESIS \ |
I think My guess is they need to call the extension initialization function, just as the standard extensions initialization function is exported (as already done), wrapped, and called. |
@rhashimoto @kaizhu256 thanks for your feedback! @rhashimoto read my mind, and it works. Thanks for your help! |
Great project, I am using @Taytay development environment which makes it super easy to build sql.js. I am trying to add extensions from ext/misc such as series into sql.js. I added series.c to the sqlite-src/sqlite-amalgamation folder and modified the Makefile:
and
BITCODE_FILES = out/sqlite3.bc out/extension-functions.bc out/series.bc
This successfully compiles, but I cannot run query on SQLite,
SELECT value FROM generate_series(5,100,5)
it says the generate_series doesnt exist. I also added "_sqlite3_series_init" to exported_functions, however, that did not change anything,Can anyone shed some light on adding custom extensions?
The text was updated successfully, but these errors were encountered: