Convert compilation artifacts to just bytes (#3239)

* Convert compilation artifacts to just bytes

This commit strips the `CompilationArtifacts` type down to simply a list
of bytes. This moves all extra metadata elsewhere to live within the
list of bytes itself as `bincode`-encoded information.

Small affordance is made to avoid an in-process
serialize-then-deserialize round-trip for use cases like `Module::new`,
but otherwise this is mostly just moving some data around.

* Rename data section to `.rodata.wasm`
This commit is contained in:
Alex Crichton
2021-08-26 21:17:02 -05:00
committed by GitHub
parent a2a6be72c4
commit d12f1d77e6
7 changed files with 168 additions and 73 deletions

View File

@@ -29,7 +29,8 @@ mod unwind;
pub use crate::code_memory::CodeMemory;
pub use crate::instantiate::{
CompilationArtifacts, CompiledModule, ModuleCode, SetupError, SymbolizeContext, TypeTables,
CompilationArtifacts, CompiledModule, CompiledModuleInfo, ModuleCode, SetupError,
SymbolizeContext, TypeTables,
};
pub use crate::link::link_module;
pub use profiling::*;