[wasm] Make the ModuleTranslationState ctor public.

It's useful for consumers which don't want to translate a whole module,
but just need translation of functions.
This commit is contained in:
Benjamin Bouvier
2019-10-15 10:25:12 +02:00
parent 566a143634
commit 1ccf056baf

View File

@@ -19,7 +19,8 @@ pub struct ModuleTranslationState {
}
impl ModuleTranslationState {
pub(crate) fn new() -> Self {
/// Creates a new empty ModuleTranslationState.
pub fn new() -> Self {
ModuleTranslationState {
wasm_types: PrimaryMap::new(),
}