Skip to content

Commit 29168bc

Browse files
committed
Don't depends incoditionally on critical-section for portable-atomic
This should fix the compilation (link) of the esp-edf build for esp32s2 in the nightly test CI, as that platform doesn't have atomic, and also we don't provide an implementation of the critical-section function from the slint-cpp crate. Use the unsafe-single-threaded feature instead. CC #5057
1 parent d30dfc0 commit 29168bc

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

‎examples/mcu-board-support/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ i-slint-core-macros = { version = "=1.9.0", path = "../../internal/core-macros"
2929

3030
derive_more = { workspace = true }
3131
embedded-graphics = { version = "0.8", optional = true }
32-
once_cell = { version = "1.9", default-features = false, features = ["alloc"] }
3332
pin-weak = { version = "1", default-features = false }
3433
rgb = "0.8.27"
3534
cfg-if = "1"

‎internal/core/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ std = ["euclid/std", "once_cell/std", "scoped-tls-hkt", "lyon_path", "lyon_algor
2828
# Unsafe feature meaning that there is only one core running and all thread_local are static.
2929
# You can only enable this feature if you are sure that any API of this crate is only called
3030
# from a single core, and not in a interrupt or signal handler.
31-
unsafe-single-threaded = []
31+
unsafe-single-threaded = ["portable-atomic/unsafe-assume-single-core", "once_cell/portable-atomic"]
3232

3333
unicode = ["unicode-script", "unicode-linebreak"]
3434

@@ -53,7 +53,7 @@ i-slint-core-macros = { workspace = true, features = ["default"] }
5353
const-field-offset = { version = "0.1.5", path = "../../helper_crates/const-field-offset" }
5454
vtable = { workspace = true }
5555

56-
portable-atomic = { version = "1", features = ["critical-section"] }
56+
portable-atomic = { version = "1" }
5757
auto_enums = "0.8.0"
5858
cfg-if = "1"
5959
derive_more = { workspace = true }
@@ -63,7 +63,7 @@ lyon_geom = { version = "1.0", optional = true }
6363
lyon_path = { version = "1.0", optional = true }
6464
lyon_extra = { version = "1.0.1", optional = true }
6565
num-traits = { version = "0.2", default-features = false }
66-
once_cell = { version = "1.5", default-features = false, features = ["critical-section"] }
66+
once_cell = { version = "1.9", default-features = false }
6767
pin-project = "1"
6868
pin-weak = { version = "1.1", default-features = false }
6969
# Note: the rgb version is extracted in ci.yaml for rustdoc builds

0 commit comments

Comments
 (0)