mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-22 05:01:33 +00:00
add the feature flag for llvm backend
This commit is contained in:
@ -39,7 +39,7 @@ glob = "0.2.11"
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["fast-tests"]
|
default = ["fast-tests"]
|
||||||
vfs = ["wasmer-runtime-abi", "wasmer-runtime-core/vfs", "wasmer-emscripten/vfs", "wasmer-clif-backend/vfs"]
|
vfs = ["wasmer-runtime-abi", "wasmer-runtime-core/vfs", "wasmer-emscripten/vfs", "wasmer-clif-backend/vfs", "wasmer-llvm-backend/vfs"]
|
||||||
debug = ["wasmer-clif-backend/debug", "wasmer-runtime-core/debug"]
|
debug = ["wasmer-clif-backend/debug", "wasmer-runtime-core/debug"]
|
||||||
# This feature will allow cargo test to run much faster
|
# This feature will allow cargo test to run much faster
|
||||||
fast-tests = []
|
fast-tests = []
|
||||||
|
2
Makefile
2
Makefile
@ -28,7 +28,7 @@ integration-tests: release
|
|||||||
|
|
||||||
lint:
|
lint:
|
||||||
cargo fmt --all -- --check
|
cargo fmt --all -- --check
|
||||||
cargo clippy --all
|
cargo clippy # --all
|
||||||
|
|
||||||
precommit: lint test
|
precommit: lint test
|
||||||
|
|
||||||
|
@ -32,4 +32,4 @@ glob = "0.2.11"
|
|||||||
[features]
|
[features]
|
||||||
clif = []
|
clif = []
|
||||||
llvm = []
|
llvm = []
|
||||||
vfs = ["wasmer-runtime-core/vfs", "wasmer-clif-backend/vfs", "wasmer-runtime-abi"]
|
vfs = ["wasmer-runtime-core/vfs", "wasmer-clif-backend/vfs", "wasmer-llvm-backend/vfs", "wasmer-runtime-abi"]
|
||||||
|
@ -28,3 +28,4 @@ wabt = "0.7.4"
|
|||||||
[features]
|
[features]
|
||||||
debug = ["wasmer-runtime-core/debug"]
|
debug = ["wasmer-runtime-core/debug"]
|
||||||
disasm = ["capstone"]
|
disasm = ["capstone"]
|
||||||
|
vfs = ["wasmer-runtime-core/vfs"]
|
||||||
|
@ -18,6 +18,9 @@ use wasmparser::{
|
|||||||
SectionCode, Type as WpType,
|
SectionCode, Type as WpType,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(feature = "vfs")]
|
||||||
|
use hashbrown::HashMap;
|
||||||
|
|
||||||
pub fn read_module(wasm: &[u8]) -> Result<(ModuleInfo, CodeSectionReader), BinaryReaderError> {
|
pub fn read_module(wasm: &[u8]) -> Result<(ModuleInfo, CodeSectionReader), BinaryReaderError> {
|
||||||
let mut info = ModuleInfo {
|
let mut info = ModuleInfo {
|
||||||
memories: Map::new(),
|
memories: Map::new(),
|
||||||
@ -42,6 +45,9 @@ pub fn read_module(wasm: &[u8]) -> Result<(ModuleInfo, CodeSectionReader), Binar
|
|||||||
|
|
||||||
namespace_table: StringTable::new(),
|
namespace_table: StringTable::new(),
|
||||||
name_table: StringTable::new(),
|
name_table: StringTable::new(),
|
||||||
|
|
||||||
|
#[cfg(feature = "vfs")]
|
||||||
|
custom_sections: HashMap::new(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut reader = ModuleReader::new(wasm)?;
|
let mut reader = ModuleReader::new(wasm)?;
|
||||||
|
Reference in New Issue
Block a user