NEP12 Extension Module Submodules - ghewgill/neon-lang GitHub Wiki

Currently all the extension modules (about 10 of them) are conceptually part of the main neon-lang repository, as Git submodules. Submodules are difficult to work with and it won't be suitable to include every extension module as a submodule. This proposal describes how to move this toward a more distributed development model.

Current Situation

The extension modules all:

  • are Git submodules within neon-lang
  • are built with scons
  • depend on being cloned into the correct place in the neon-lang tree so they can find neonext.h
  • cannot be built independently
  • do not have their own CI builds

Proposal

Extension modules will now:

  • no longer be Git submodules of neon-lang
  • be built with cmake
  • can be built anywhere because they are self-contained (include their own copy of neonext.h)
  • can still be built within the context of a neon-lang build
  • have their own CI builds

Changes required for each extension module:

  • Create a standalone cmake build
  • Include CI build instruction files
  • Include a copy of neonext.h

Changes required to neon-lang:

  • Change CMakeLists.txt file to look for any extension modules under lib/ and build them
  • Introduce a module index file which lists modules and their clone URL
  • Add a few basic scripts to get extension modules based on the module index file