mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-12 21:38:39 +00:00
fix(compiler) Make it work without std.
This patch uses our `lib` module that builds an `std` module depending of the `core` or `std` feature flag.
This commit is contained in:
@@ -38,15 +38,14 @@ extern crate alloc;
|
||||
mod lib {
|
||||
#[cfg(feature = "core")]
|
||||
pub mod std {
|
||||
#[macro_use]
|
||||
pub use alloc::{borrow, boxed, string, vec, sync};
|
||||
pub use alloc::{borrow, boxed, str, string, sync, vec};
|
||||
pub use core::fmt;
|
||||
pub use hashbrown as collections;
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
pub mod std {
|
||||
pub use std::{borrow, boxed, collections, fmt, string, sync, vec};
|
||||
pub use std::{borrow, boxed, collections, fmt, str, string, sync, vec};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +69,7 @@ mod sourceloc;
|
||||
pub use crate::address_map::{FunctionAddressMap, InstructionAddressMap};
|
||||
#[cfg(feature = "translator")]
|
||||
pub use crate::compiler::{Compiler, CompilerConfig};
|
||||
pub use crate::error::{CompileError, WasmError, WasmResult};
|
||||
pub use crate::error::{CompileError, ParseCpuFeatureError, WasmError, WasmResult};
|
||||
pub use crate::function::{
|
||||
Compilation, CompiledFunction, CompiledFunctionFrameInfo, CustomSections, Dwarf, FunctionBody,
|
||||
Functions,
|
||||
@@ -82,7 +81,7 @@ pub use crate::section::{CustomSection, CustomSectionProtection, SectionBody, Se
|
||||
pub use crate::sourceloc::SourceLoc;
|
||||
pub use crate::target::{
|
||||
Architecture, BinaryFormat, CallingConvention, CpuFeature, Endianness, OperatingSystem,
|
||||
ParseCpuFeatureError, PointerWidth, Target, Triple,
|
||||
PointerWidth, Target, Triple,
|
||||
};
|
||||
#[cfg(feature = "translator")]
|
||||
pub use crate::translator::{
|
||||
|
||||
Reference in New Issue
Block a user