Move "wasm" allocator into its own crate (#4716)

This moves the wasm-allocator (`FreeingBumpHeapAllocator`) into its own
crate `sp-allocator`. This new crate can theoretically provide multiple
different allocators. Besides moving the allocator, this pr also makes
`FreeingBumpHeapAllocator` compile on `no_std`.
This commit is contained in:
Bastian Köcher
2020-01-22 18:13:17 +01:00
committed by Sergei Pepyakin
parent 670ce71009
commit 5bd6e94e64
21 changed files with 230 additions and 70 deletions
+16
View File
@@ -5424,6 +5424,7 @@ dependencies = [
"derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"sp-allocator 2.0.0",
"sp-core 2.0.0",
"sp-runtime-interface 2.0.0",
"sp-serializer 2.0.0",
@@ -5439,6 +5440,7 @@ dependencies = [
"parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sc-executor-common 0.8.0",
"sp-allocator 2.0.0",
"sp-core 2.0.0",
"sp-runtime-interface 2.0.0",
"sp-wasm-interface 2.0.0",
@@ -5459,6 +5461,7 @@ dependencies = [
"parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sc-executor-common 0.8.0",
"sp-allocator 2.0.0",
"sp-core 2.0.0",
"sp-runtime-interface 2.0.0",
"sp-wasm-interface 2.0.0",
@@ -5732,6 +5735,7 @@ dependencies = [
name = "sc-runtime-test"
version = "2.0.0"
dependencies = [
"sp-allocator 2.0.0",
"sp-core 2.0.0",
"sp-io 2.0.0",
"sp-runtime 2.0.0",
@@ -6184,6 +6188,17 @@ name = "sourcefile"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "sp-allocator"
version = "2.0.0"
dependencies = [
"derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"sp-core 2.0.0",
"sp-std 2.0.0",
"sp-wasm-interface 2.0.0",
]
[[package]]
name = "sp-api"
version = "2.0.0"
@@ -6739,6 +6754,7 @@ name = "sp-wasm-interface"
version = "2.0.0"
dependencies = [
"impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"sp-std 2.0.0",
"wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
]