Skip to content

Commit

Permalink
Make precompile and can_precompile not take self
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
  • Loading branch information
jprendes committed Dec 20, 2024
1 parent 95853b4 commit 77859b5
Show file tree
Hide file tree
Showing 5 changed files with 171 additions and 99 deletions.
4 changes: 2 additions & 2 deletions crates/containerd-shim-wasm/src/container/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub trait Engine: Clone + Send + Sync + 'static {
/// The cached, precompiled layers will be reloaded on subsequent runs.
/// The runtime is expected to return the same number of layers passed in, if the layer cannot be precompiled it should return `None` for that layer.
/// In some edge cases it is possible that the layers may already be precompiled and None should be returned in this case.
fn precompile(&self, _layers: &[WasmLayer]) -> Result<Vec<Option<Vec<u8>>>> {
fn precompile(_layers: &[WasmLayer]) -> Result<Vec<Option<Vec<u8>>>> {
bail!("precompile not supported");
}

Expand All @@ -78,7 +78,7 @@ pub trait Engine: Clone + Send + Sync + 'static {
/// "runwasi.io/precompiled/<Engine.name()>/<unique_string>"
///
/// When it returns None the runtime will not be asked to precompile the module. This is the default value.
fn can_precompile(&self) -> Option<String> {
fn can_precompile() -> Option<String> {
None
}
}
Loading

0 comments on commit 77859b5

Please sign in to comment.