What problems am I trying to solve?
-Better and safer mechanism for utilizing external libraries in coreir
-Ability to define and create multiple library implementations for coreir libraries.
-Link different implementations for the same library in a non-adhoc way.
Proposal:
-Separate the concept of a library and a library implementation.
-A library defines all the modules and generators (including typegens) for that particular library stored in a Namespace.
-An implementation fills in the definition or other metadata for all (or a subset) of the modules/generators defined in a library
-Store all external libraries in an organized directory (similar to something like rust crates)
-Embed external library requirements in json file so that these libraries can be loaded before deserializing the rest of the json file
-API for "linking" library implementations
Possible Issues
-Using the dynamic library approach for both libraries and implementations is unsafe as either can edit anything in the entire CoreIR context.
-Possibly wanting to load multiple implementations for the same library
-Link-time dependencies. What happens when a library implementation requires another library
Future features not in this proposal.
-submodules
-safer linking aka isolating the library/implementation from the full coreir context.
-Specifying libraries using a script and/or Magma instead of dynamic libraries
-Versioning libraries and library implementations
What problems am I trying to solve? -Better and safer mechanism for utilizing external libraries in coreir -Ability to define and create multiple library implementations for coreir libraries. -Link different implementations for the same library in a non-adhoc way.
Proposal: -Separate the concept of a library and a library implementation. -A library defines all the modules and generators (including typegens) for that particular library stored in a Namespace. -An implementation fills in the definition or other metadata for all (or a subset) of the modules/generators defined in a library -Store all external libraries in an organized directory (similar to something like rust crates) -Embed external library requirements in json file so that these libraries can be loaded before deserializing the rest of the json file -API for "linking" library implementations
Possible Issues -Using the dynamic library approach for both libraries and implementations is unsafe as either can edit anything in the entire CoreIR context. -Possibly wanting to load multiple implementations for the same library -Link-time dependencies. What happens when a library implementation requires another library
Future features not in this proposal. -submodules -safer linking aka isolating the library/implementation from the full coreir context. -Specifying libraries using a script and/or Magma instead of dynamic libraries -Versioning libraries and library implementations