Remove unneeded extern crate, macro_use, and tidy uses.
This commit is contained in:
@@ -2,14 +2,12 @@
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
use pyo3::prelude::*;
|
||||
use pyo3::types::PyTuple;
|
||||
|
||||
use crate::value::{pyobj_to_value, value_to_pyobj};
|
||||
use alloc::rc::Rc;
|
||||
use core::cell::RefCell;
|
||||
|
||||
use cranelift_codegen::ir;
|
||||
use pyo3::prelude::*;
|
||||
use pyo3::types::PyTuple;
|
||||
use wasmtime_interface_types::ModuleData;
|
||||
use wasmtime_jit::{Context, InstanceHandle};
|
||||
use wasmtime_runtime::Export;
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
use pyo3::prelude::*;
|
||||
use pyo3::types::{PyAny, PyDict, PyTuple};
|
||||
|
||||
use crate::function::Function;
|
||||
use crate::memory::Memory;
|
||||
use crate::value::{read_value_from, write_value_to};
|
||||
use alloc::rc::Rc;
|
||||
use core::cell::RefCell;
|
||||
use core::cmp;
|
||||
use cranelift_codegen::ir::types;
|
||||
use cranelift_codegen::ir::{InstBuilder, StackSlotData, StackSlotKind};
|
||||
use cranelift_codegen::Context;
|
||||
@@ -15,16 +15,14 @@ use cranelift_codegen::{binemit, ir, isa};
|
||||
use cranelift_entity::{EntityRef, PrimaryMap};
|
||||
use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext};
|
||||
use cranelift_wasm::{DefinedFuncIndex, FuncIndex};
|
||||
use pyo3::prelude::*;
|
||||
use pyo3::types::{PyAny, PyDict, PyTuple};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use target_lexicon::HOST;
|
||||
use wasmtime_environ::{CompiledFunction, Export, Module};
|
||||
use wasmtime_jit::CodeMemory;
|
||||
use wasmtime_runtime::{Imports, InstanceHandle, VMContext, VMFunctionBody};
|
||||
|
||||
use alloc::rc::Rc;
|
||||
use core::cell::RefCell;
|
||||
use core::cmp;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
struct BoundPyFunction {
|
||||
name: String,
|
||||
obj: PyObject,
|
||||
|
||||
@@ -2,16 +2,13 @@
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
use pyo3::prelude::*;
|
||||
use pyo3::types::PyDict;
|
||||
|
||||
use crate::function::Function;
|
||||
use crate::memory::Memory;
|
||||
use alloc::rc::Rc;
|
||||
use core::cell::RefCell;
|
||||
|
||||
use cranelift_codegen::ir;
|
||||
use cranelift_codegen::ir::types;
|
||||
use cranelift_codegen::ir::{self, types};
|
||||
use pyo3::prelude::*;
|
||||
use pyo3::types::PyDict;
|
||||
use wasmtime_environ::Export;
|
||||
use wasmtime_interface_types::ModuleData;
|
||||
use wasmtime_jit::{Context, InstanceHandle};
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
use pyo3::exceptions::Exception;
|
||||
use pyo3::prelude::*;
|
||||
use pyo3::types::{PyBytes, PyDict, PySet};
|
||||
use pyo3::wrap_pyfunction;
|
||||
|
||||
use crate::import::into_instance_from_obj;
|
||||
use crate::instance::Instance;
|
||||
use crate::memory::Memory;
|
||||
use crate::module::Module;
|
||||
use core::cell::RefCell;
|
||||
use pyo3::exceptions::Exception;
|
||||
use pyo3::prelude::*;
|
||||
use pyo3::types::{PyBytes, PyDict, PySet};
|
||||
use pyo3::wrap_pyfunction;
|
||||
use std::rc::Rc;
|
||||
use wasmtime_interface_types::ModuleData;
|
||||
|
||||
|
||||
@@ -2,17 +2,15 @@
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
use alloc::rc::Rc;
|
||||
use core::cell::RefCell;
|
||||
use core::ptr;
|
||||
use pyo3::class::PyBufferProtocol;
|
||||
use pyo3::exceptions::BufferError;
|
||||
use pyo3::ffi;
|
||||
use pyo3::prelude::*;
|
||||
|
||||
use alloc::rc::Rc;
|
||||
use core::cell::RefCell;
|
||||
use core::ptr;
|
||||
use std::ffi::CStr;
|
||||
use std::os::raw::{c_int, c_void};
|
||||
|
||||
use wasmtime_environ::MemoryPlan;
|
||||
use wasmtime_jit::{Context, InstanceHandle};
|
||||
use wasmtime_runtime::{Export, VMMemoryDefinition, VMMemoryImport};
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
use pyo3::prelude::*;
|
||||
|
||||
use alloc::rc::Rc;
|
||||
use pyo3::prelude::*;
|
||||
|
||||
#[pyclass]
|
||||
pub struct Module {
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
//! Utility functions to handle values conversion between abstractions/targets.
|
||||
|
||||
use pyo3::exceptions::Exception;
|
||||
use pyo3::prelude::*;
|
||||
use pyo3::types::PyAny;
|
||||
|
||||
use core::ptr;
|
||||
use cranelift_codegen::ir;
|
||||
use pyo3::exceptions::Exception;
|
||||
use pyo3::prelude::*;
|
||||
use pyo3::types::PyAny;
|
||||
use wasmtime_interface_types::Value;
|
||||
|
||||
pub fn pyobj_to_value(_: Python, p: &PyAny) -> PyResult<Value> {
|
||||
|
||||
Reference in New Issue
Block a user