on the external module part, the remaining thing is the bi-directional serializability of the runtime.Module(they are not as things like DSO is only one directionally readable).
As a result the runtime.Module are attached as optional attributes, which served the same purpose, but not exactly getting things
A better move would be a Artifact style interface that captures the compiled artifacts, while still being bi-directional serializable. Then runtime.Module becomes the interface just for loading and execution (but not exportation).
The rough state transition will look like
IRModule( with extern Artifacts) => Build=> Artifact
Artifacts=>Save =>Load=>Artifact
Artifcast=>Export => DSO
DSO=>Load =>RT.Module
Artifact(JITtable) => JIT=> RT.Module