mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 19:41:05 +00:00
Move client only primitives to another dir (#9220)
* Move alloc primitive (not used in /pallets) * Move to alternative location as not shared * moved crates to different dir * ren sp_chain_spec to sc_chain_spec_primatives * merged sc-chain-spec and moved allocation up one. * no no_std * nudge * Bump CI
This commit is contained in:
@@ -23,7 +23,7 @@ sc-executor-common = { version = "0.9.0", path = "../common" }
|
||||
sp-wasm-interface = { version = "3.0.0", path = "../../../primitives/wasm-interface" }
|
||||
sp-runtime-interface = { version = "3.0.0", path = "../../../primitives/runtime-interface" }
|
||||
sp-core = { version = "3.0.0", path = "../../../primitives/core" }
|
||||
sp-allocator = { version = "3.0.0", path = "../../../primitives/allocator" }
|
||||
sc-allocator = { version = "3.0.0", path = "../../allocator" }
|
||||
wasmtime = "0.27.0"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -24,7 +24,7 @@ use crate::util;
|
||||
use std::{cell::RefCell, rc::Rc};
|
||||
use log::trace;
|
||||
use codec::{Encode, Decode};
|
||||
use sp_allocator::FreeingBumpHeapAllocator;
|
||||
use sc_allocator::FreeingBumpHeapAllocator;
|
||||
use sc_executor_common::error::Result;
|
||||
use sc_executor_common::sandbox::{self, SandboxCapabilities, SupervisorFuncIndex};
|
||||
use sp_core::sandbox as sandbox_primitives;
|
||||
|
||||
@@ -340,7 +340,7 @@ impl InstanceWrapper {
|
||||
|
||||
let range = util::checked_range(address.into(), data.len(), memory.len())
|
||||
.ok_or_else(|| Error::Other("memory write is out of bounds".into()))?;
|
||||
&mut memory[range].copy_from_slice(data);
|
||||
memory[range].copy_from_slice(data);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -351,7 +351,7 @@ impl InstanceWrapper {
|
||||
/// to get more details.
|
||||
pub fn allocate(
|
||||
&self,
|
||||
allocator: &mut sp_allocator::FreeingBumpHeapAllocator,
|
||||
allocator: &mut sc_allocator::FreeingBumpHeapAllocator,
|
||||
size: WordSize,
|
||||
) -> Result<Pointer<u8>> {
|
||||
unsafe {
|
||||
@@ -368,7 +368,7 @@ impl InstanceWrapper {
|
||||
/// Returns `Err` in case the given memory region cannot be deallocated.
|
||||
pub fn deallocate(
|
||||
&self,
|
||||
allocator: &mut sp_allocator::FreeingBumpHeapAllocator,
|
||||
allocator: &mut sc_allocator::FreeingBumpHeapAllocator,
|
||||
ptr: Pointer<u8>,
|
||||
) -> Result<()> {
|
||||
unsafe {
|
||||
|
||||
@@ -31,7 +31,7 @@ use sc_executor_common::{
|
||||
runtime_blob::{DataSegmentsSnapshot, ExposedMutableGlobalsSet, GlobalsSnapshot, RuntimeBlob},
|
||||
wasm_runtime::{WasmModule, WasmInstance, InvokeMethod},
|
||||
};
|
||||
use sp_allocator::FreeingBumpHeapAllocator;
|
||||
use sc_allocator::FreeingBumpHeapAllocator;
|
||||
use sp_runtime_interface::unpack_ptr_and_len;
|
||||
use sp_wasm_interface::{Function, Pointer, WordSize, Value};
|
||||
use wasmtime::{Engine, Store};
|
||||
|
||||
Reference in New Issue
Block a user