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

Enable all SQLite extensions that do not require code changes. #56476

Open
TheOneTheOnlyJJ opened this issue Jan 5, 2025 · 5 comments
Open
Labels
feature request Issues that request new features to be added to Node.js.

Comments

@TheOneTheOnlyJJ
Copy link

TheOneTheOnlyJJ commented Jan 5, 2025

What is the problem this feature will solve?

SQLite has a few compile-time extensions that are not enabled by default in Node.js, meaning developers cannot use them out of the box.

Inspired by #56447, I suggest enabling all SQLite extensions that do not require additional code written by default (just as the math functions from #56447). We should target the entire SQLite amalgamation and all the other default extensions (again, such as the math functions from #56447).

Potential candidates include:

Unless there are explicit reasons why these should not be included, I see no reason to withhold them from developers.

What is the feature you are proposing to solve the problem?

Add the extensions' compile-time extension flags to Node.

What alternatives have you considered?

Compiling and linking your build of SQLite with the extensions enabled is a major hassle for developers and users alike.

@TheOneTheOnlyJJ TheOneTheOnlyJJ added the feature request Issues that request new features to be added to Node.js. label Jan 5, 2025
@github-project-automation github-project-automation bot moved this to Awaiting Triage in Node.js feature requests Jan 5, 2025
@geeksilva97
Copy link
Contributor

geeksilva97 commented Jan 16, 2025

Would you have any objection, @cjihrig?

(I'm about to mention better-sqlite3 again 😅 ) better-sqlite has some of these

@TheOneTheOnlyJJ
Copy link
Author

After taking another look at this, I noticed that the RBU extension is not fit to be added. However, from the list you shared here, I now see even more viable extensions that I didn't know existed until now (like geopoly).
Adding these flags would increase the build size, but other than that, we would get more SQLite features with no other effort involved.

@cjihrig
Copy link
Contributor

cjihrig commented Jan 16, 2025

Would you have any objection, @cjihrig?

No objection, but I think we should evaluate each one of these individually. We need to weigh features against any impact on performance and/or binary size.

@TheOneTheOnlyJJ
Copy link
Author

I'm very busy at this time and cannot contribute, but what are the steps required to do this properly?

Do tests have to be written?

No objection, but I think we should evaluate each one of these individually. We need to weigh features against any impact on performance and/or binary size.

How would this impact be effectively measured?

I'm interested in the perspectives being considered when deciding on each extension.

@cjihrig
Copy link
Contributor

cjihrig commented Jan 17, 2025

Do tests have to be written?

If new functionality is enabled, there should be at least one test to prevent regressions.

How would this impact be effectively measured?

For #56541 I wrote a script and compared the execution time with and without the change. To evaluate the binary size, you can look at the file size of the node binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js.
Projects
Status: Awaiting Triage
Development

No branches or pull requests

3 participants