-
Notifications
You must be signed in to change notification settings - Fork 171
Parser-less build mode #976
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
Labels
enhancement
New feature or request
Comments
Sounds interesting! I assume |
No |
bnoordhuis
added a commit
to bnoordhuis/quickjs
that referenced
this issue
Apr 8, 2025
Add a QJS_ENABLE_PARSER build option that enables/disables the parser. Useful if you want to execute bytecode but not parse source code, e.g., for hardening reasons, or due to running in a constrained environment. Shrinks a release build by about 15%. Fixes: quickjs-ng#976
#1021 for people who want to test it. |
bnoordhuis
added a commit
to bnoordhuis/quickjs
that referenced
this issue
Apr 10, 2025
Add a QJS_DISABLE_PARSER build option that disables the JS source code parser. The JSON parser is unaffected. Useful if you want to execute bytecode but not parse source code, e.g., for hardening reasons, or due to running in a constrained environment. Shrinks a release build by about 15%. Fixes: quickjs-ng#976
bnoordhuis
added a commit
that referenced
this issue
Apr 10, 2025
Add a QJS_DISABLE_PARSER build option that disables the JS source code parser. The JSON parser is unaffected. Useful if you want to execute bytecode but not parse source code, e.g., for hardening reasons, or due to running in a constrained environment. Shrinks a release build by about 15%. Fixes: #976
graham
pushed a commit
to graham/quickjs
that referenced
this issue
Apr 11, 2025
Add a QJS_DISABLE_PARSER build option that disables the JS source code parser. The JSON parser is unaffected. Useful if you want to execute bytecode but not parse source code, e.g., for hardening reasons, or due to running in a constrained environment. Shrinks a release build by about 15%. Fixes: quickjs-ng#976
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Something touched upon recently by @chqrlie: make it possible to build qjs without the JS parser and bytecode generator.
Such builds can only execute bytecode read with
JS_ReadObject()
but you get a substantially smaller library in return. The parser makes up 15-25% of the library, depending on how you count.Useful for embedded environments. Cuts down on attack surface.
A challenge is that
JSON.parse()
uses bits and pieces of the parser.The text was updated successfully, but these errors were encountered: