Skip to content

Commit

Permalink
revert capi
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian committed Jan 13, 2025
1 parent acc3db6 commit 5a5aa8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions ffi/capi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ denylist = ["bench"]
max_combination_size = 2

[features]
default = ["compiled_data", "default_components", "logging", "simple_logger"]
default = ["compiled_data", "default_components", "logging", "simple_logger", "std"]
any_provider = []
buffer_provider = [
"dep:icu_provider_blob",
Expand All @@ -57,8 +57,8 @@ buffer_provider = [
"icu_timezone?/serde",
"icu_experimental?/serde",
]
provider_fs = ["dep:icu_provider_fs", "buffer_provider"]
logging = ["icu_provider/logging", "dep:log", "diplomat-runtime/log"]
provider_fs = ["dep:icu_provider_fs", "buffer_provider", "std"]
logging = ["icu_provider/logging", "dep:log", "diplomat-runtime/log", "std"]
simple_logger = ["dep:simple_logger", "logging"]

# Components
Expand Down Expand Up @@ -108,6 +108,7 @@ compiled_data = [
"icu_experimental?/compiled_data",
]

std = []
# Adds a looping panic handler (useful for no_std targets)
looping_panic_handler = []
# Uses malloc as the global allocator (useful for no_std targets)
Expand Down
6 changes: 3 additions & 3 deletions ffi/capi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).

// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, doc)), no_std)]
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![cfg_attr(
not(test),
deny(
Expand Down Expand Up @@ -46,14 +46,14 @@
#[cfg(target_arch = "wasm32")]
extern crate std as rust_std;

#[cfg(all(target_os = "none", feature = "looping_panic_handler"))]
#[cfg(all(not(feature = "std"), feature = "looping_panic_handler"))]
#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
loop {}
}

extern crate alloc;
#[cfg(all(target_os = "none", feature = "libc_alloc"))]
#[cfg(all(not(feature = "std"), feature = "libc_alloc"))]
extern crate libc_alloc;

// Common modules
Expand Down

0 comments on commit 5a5aa8a

Please sign in to comment.