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

QuickJS modules. #779

Merged
merged 3 commits into from
Sep 18, 2024
Merged

QuickJS modules. #779

merged 3 commits into from
Sep 18, 2024

Commits on Sep 14, 2024

  1. CI: removed DUMP_LEAKS flag from QuickJS build.

    While it is useful for debugging what objects are leaking at the end
    this flag hides QuickJS JSString leaks from Address Sanitizer.
    xeioex committed Sep 14, 2024
    Configuration menu
    Copy the full SHA
    4843b4e View commit details
    Browse the repository at this point in the history
  2. Modules: introduced engine API.

    No functional changes.
    xeioex committed Sep 14, 2024
    Configuration menu
    Copy the full SHA
    1df6159 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2024

  1. Modules: introduced QuickJS engine.

    "js_engine" directive is introduced which sets JavaScript engine.
    When the module is built with QuickJS library "js_engine qjs;" sets
    QuickJS engine for the current block. By default njs engine is used.
    
    For example,
    
    nginx.conf:
    
        location /a {
            js_engine qjs;
            # will be handled by QuickJS
            js_content main.handler;
        }
    
        location /b {
            # will be handled by njs
            js_content main.handler;
        }
    
    QuickJS engine implements drop-in replacement for nginx/njs objects
    with the following exceptions:
    
        * nginx module API to be added later: ngx.fetch(), ngx.shared.dict.
        * Built-in modules to be added later: fs, crypto, WebCrypto, xml.
        * NJS specific API: njs.dump(), njs.on(), console.dump().
        * js_preload_object directive.
    xeioex committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    a833fa5 View commit details
    Browse the repository at this point in the history