Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-1078

Allow extensions to be built into the WiredTiger library

    • Type: Icon: Task Task
    • Resolution: Done
    • WT2.3.0
    • Affects Version/s: None
    • Component/s: None

      In some situations requiring a shared library for compression is a hassle. For example the WiredTiger LevelDB API will always require snappy, and it's not obvious where to find the WiredTiger snappy shared object. Similarly for any WiredTiger Node APIs - especially since Node requires libraries to be statically linked.

      A proposal is to add a new option to configure of the form:

      --with-builtins=snappy
      

      What the option will do is:

      • Change the entry point for the WiredTiger snappy library from
        Unable to find source-code formatter for language: wiredtiger_extension_init```. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
         to 

        snappy_extension_init

         (or similar).
        * Have the WiredTiger snappy library code built into the WiredTiger library.
        * Create a new string that is something like: 

        #define BUILTIN_EXTENSIONS="snappy"

        * Add functionality to 

        ___conn_load_extensions

        , so that it loads the built in snappy library (using the BUILTIN_EXTENSIONS string). It can do this by using 

        dlopen(null, ...)

        , or via a direct call to the function - depending on whether we want code in conn_api.c to be conditionally compiled.
        * Disallow both 

        --enable-snappy

         and 

        --with-builtins=snappy

         to the same configure command.
        
        Further.. This scheme should be extensible, so we can support a list of built in extensions. For example:
        
        

        --with-builtins=snappy,zlib
        `

            Assignee:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Reporter:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: