Skip to content

Commit 93544f2

Browse files
committed
Implement for repack
1 parent 821c88c commit 93544f2

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

libchisel/src/repack.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
use std::collections::HashMap;
2+
13
use parity_wasm::builder;
24
use parity_wasm::elements::Module;
35

4-
use super::{ChiselModule, ModuleError, ModuleKind, ModuleTranslator};
6+
use super::{ChiselModule, ModuleConfig, ModuleError, ModuleKind, ModuleTranslator};
57

68
pub struct Repack;
79

@@ -27,6 +29,16 @@ impl<'a> ChiselModule<'a> for Repack {
2729
}
2830
}
2931

32+
impl ModuleConfig for Repack {
33+
fn with_defaults() -> Result<Self, ModuleError> {
34+
Ok(Repack::new())
35+
}
36+
37+
fn with_config(config: &HashMap<String, String>) -> Result<Self, ModuleError> {
38+
Err(ModuleError::NotSupported)
39+
}
40+
}
41+
3042
impl ModuleTranslator for Repack {
3143
fn translate_inplace(&self, _module: &mut Module) -> Result<bool, ModuleError> {
3244
Err(ModuleError::NotSupported)

0 commit comments

Comments
 (0)