mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-08 05:38:19 +00:00
Fix errors from "make lint"
This commit is contained in:
@@ -14,6 +14,12 @@ use structopt::StructOpt;
|
||||
use wasmer::*;
|
||||
use wasmer_object::{emit_serialized, get_object_for_target};
|
||||
|
||||
/// The `prefixer` returns the a String to prefix each of the
|
||||
/// functions in the static object generated by the
|
||||
/// so we can assure no collisions.
|
||||
#[cfg(feature = "static-artifact-create")]
|
||||
pub type PrefixerFn = Box<dyn Fn(&[u8]) -> String + Send>;
|
||||
|
||||
const WASMER_MAIN_C_SOURCE: &[u8] = include_bytes!("wasmer_create_exe_main.c");
|
||||
#[cfg(feature = "static-artifact-create")]
|
||||
const WASMER_STATIC_MAIN_C_SOURCE: &[u8] = include_bytes!("wasmer_static_create_exe_main.c");
|
||||
@@ -135,7 +141,7 @@ impl CreateExe {
|
||||
let features = engine_inner.features();
|
||||
let tunables = store.tunables();
|
||||
let data: Vec<u8> = fs::read(wasm_module_path)?;
|
||||
let prefixer: Option<Box<dyn Fn(&[u8]) -> String + Send>> = None;
|
||||
let prefixer: Option<PrefixerFn> = None;
|
||||
let (module_info, obj, metadata_length, symbol_registry) =
|
||||
Artifact::generate_object(
|
||||
compiler, &data, prefixer, &target, tunables, features,
|
||||
|
||||
Reference in New Issue
Block a user