Skip to content

Commit

Permalink
Remove malloc feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Aug 21, 2021
1 parent fff2280 commit f4a25e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 61 deletions.
10 changes: 2 additions & 8 deletions ffi/capi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ all-features = true
skip_optional_dependencies = true
# Bench feature gets tested separately and is only relevant for CI.
# wearos/freertos/x86tiny are not relevant in normal environments,
# smaller_static gets tested on the FFI job anyway,
# and malloc will only work on platforms with malloc (and will eventually be tested
# as part of the wasm job)
denylist = ["bench", "wearos", "freertos", "x86tiny", "smaller_static", "malloc"]
# smaller_static gets tested on the FFI job anyway
denylist = ["bench", "wearos", "freertos", "x86tiny", "smaller_static"]

[lib]
crate-type = ["staticlib", "rlib"]
Expand All @@ -58,10 +56,6 @@ x86tiny = ["dlmalloc"]
# Enables no_std builds for freertos
freertos = ["freertos-rust", "cortex-m"]

# Sets the global allocator to malloc
# Primarily useful for using this crate from C++ in a WASM context
malloc = []

[dependencies]
fixed_decimal = { path = "../../utils/fixed_decimal" }
icu_decimal = { path = "../../components/decimal/" }
Expand Down
16 changes: 2 additions & 14 deletions ffi/capi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,8 @@ pub mod provider;
#[cfg(target_arch = "wasm32")]
mod wasm_glue;

#[cfg(all(
feature = "freertos",
not(any(feature = "x86tiny", feature = "malloc"))
))]
#[cfg(all(feature = "freertos", not(feature = "x86tiny")))]
mod freertos_glue;

#[cfg(all(
feature = "x86tiny",
not(any(feature = "freertos", feature = "malloc"))
))]
#[cfg(all(feature = "x86tiny", not(feature = "freertos")))]
mod x86tiny_glue;

#[cfg(all(
feature = "malloc",
not(any(feature = "x86tiny", feature = "freertos_glue"))
))]
mod malloc_glue;
39 changes: 0 additions & 39 deletions ffi/capi/src/malloc_glue.rs

This file was deleted.

0 comments on commit f4a25e8

Please sign in to comment.