mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-22 05:01:33 +00:00
Cleanup build warnings imports and unnecessary unsafe
This commit is contained in:
@ -5,7 +5,7 @@ use std::sync::Arc;
|
|||||||
use wasmer_runtime_core::{
|
use wasmer_runtime_core::{
|
||||||
backend::{sys::Memory, CacheGen},
|
backend::{sys::Memory, CacheGen},
|
||||||
cache::{Artifact, Error},
|
cache::{Artifact, Error},
|
||||||
module::{ModuleInfo, ModuleInner},
|
module::ModuleInfo,
|
||||||
structures::Map,
|
structures::Map,
|
||||||
types::{LocalFuncIndex, SigIndex},
|
types::{LocalFuncIndex, SigIndex},
|
||||||
};
|
};
|
||||||
|
@ -297,7 +297,7 @@ impl LLVMBackend {
|
|||||||
let callbacks = get_callbacks();
|
let callbacks = get_callbacks();
|
||||||
let mut module: *mut LLVMModule = ptr::null_mut();
|
let mut module: *mut LLVMModule = ptr::null_mut();
|
||||||
|
|
||||||
let slice = unsafe { memory.as_slice() };
|
let slice = memory.as_slice();
|
||||||
|
|
||||||
let res = module_load(slice.as_ptr(), slice.len(), callbacks, &mut module);
|
let res = module_load(slice.as_ptr(), slice.len(), callbacks, &mut module);
|
||||||
|
|
||||||
@ -307,7 +307,7 @@ impl LLVMBackend {
|
|||||||
|
|
||||||
static SIGNAL_HANDLER_INSTALLED: Once = Once::new();
|
static SIGNAL_HANDLER_INSTALLED: Once = Once::new();
|
||||||
|
|
||||||
SIGNAL_HANDLER_INSTALLED.call_once(|| unsafe {
|
SIGNAL_HANDLER_INSTALLED.call_once(|| {
|
||||||
crate::platform::install_signal_handler();
|
crate::platform::install_signal_handler();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ use wasmer_runtime_core::{
|
|||||||
backend::{sys::Memory, Backend, CacheGen, Compiler, CompilerConfig, Token},
|
backend::{sys::Memory, Backend, CacheGen, Compiler, CompilerConfig, Token},
|
||||||
cache::{Artifact, Error as CacheError},
|
cache::{Artifact, Error as CacheError},
|
||||||
error::{CompileError, CompileResult},
|
error::{CompileError, CompileResult},
|
||||||
module::{ModuleInfo, ModuleInner},
|
module::ModuleInner,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Placeholder;
|
struct Placeholder;
|
||||||
|
@ -15,8 +15,7 @@ use wasmer_runtime_core::{
|
|||||||
units::Pages,
|
units::Pages,
|
||||||
};
|
};
|
||||||
use wasmparser::{
|
use wasmparser::{
|
||||||
BinaryReaderError, Data, DataKind, Element, ElementKind, Export, ExternalKind, FuncType,
|
BinaryReaderError, ExternalKind, FuncType, ImportSectionEntryType, Operator, Type as WpType,
|
||||||
Import, ImportSectionEntryType, InitExpr, ModuleReader, Operator, SectionCode, Type as WpType,
|
|
||||||
WasmDecoder,
|
WasmDecoder,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
use cmake::Config;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
{
|
{
|
||||||
|
use cmake::Config;
|
||||||
let project_name = "exception_handling";
|
let project_name = "exception_handling";
|
||||||
let dst = Config::new(project_name).build();
|
let dst = Config::new(project_name).build();
|
||||||
println!("cargo:rustc-link-search=native={}", dst.display());
|
println!("cargo:rustc-link-search=native={}", dst.display());
|
||||||
|
Reference in New Issue
Block a user