mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-01 12:24:16 +00:00
Change the name of the compat feature (#2230)
And remove the compat-0-2-0 and compat-0-3-0 features
This commit is contained in:
parent
361526fb33
commit
8450e01a3f
18 changed files with 25 additions and 28 deletions
|
|
@ -21,6 +21,7 @@ All notable changes to this project are documented in this file.
|
||||||
explicitly if you want to create a copy.
|
explicitly if you want to create a copy.
|
||||||
- In Rust, the MAX_BUFFER_AGE const parameter of `slint::platform::software_renderer::MinimalSoftwareWindow`
|
- In Rust, the MAX_BUFFER_AGE const parameter of `slint::platform::software_renderer::MinimalSoftwareWindow`
|
||||||
has been removed and replaced by an argument to the `new()` function
|
has been removed and replaced by an argument to the `new()` function
|
||||||
|
- the `compat-0-3-0` mandatory cargo feature flag was renamed to `compat-1-0`
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ i-slint-backend-selector = { version = "=1.0.0", path="../../internal/backends/s
|
||||||
i-slint-backend-testing = { version = "=1.0.0", path="../../internal/backends/testing", optional = true }
|
i-slint-backend-testing = { version = "=1.0.0", path="../../internal/backends/testing", optional = true }
|
||||||
i-slint-renderer-skia = { version = "=1.0.0", path="../../internal/renderers/skia", optional = true, features = ["x11", "wayland"] }
|
i-slint-renderer-skia = { version = "=1.0.0", path="../../internal/renderers/skia", optional = true, features = ["x11", "wayland"] }
|
||||||
i-slint-core = { version = "=1.0.0", path="../../internal/core", features = ["ffi"] }
|
i-slint-core = { version = "=1.0.0", path="../../internal/core", features = ["ffi"] }
|
||||||
slint-interpreter = { version = "=1.0.0", path="../../internal/interpreter", default-features = false, features = ["ffi", "compat-0-3-0"], optional = true }
|
slint-interpreter = { version = "=1.0.0", path="../../internal/interpreter", default-features = false, features = ["ffi", "compat-1-0"], optional = true }
|
||||||
raw-window-handle = { version = "0.5", optional = true }
|
raw-window-handle = { version = "0.5", optional = true }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|
|
||||||
|
|
@ -24,17 +24,15 @@ default = [
|
||||||
"backend-winit",
|
"backend-winit",
|
||||||
"renderer-winit-femtovg",
|
"renderer-winit-femtovg",
|
||||||
"backend-qt",
|
"backend-qt",
|
||||||
"compat-0-3-0",
|
"compat-1-0",
|
||||||
]
|
]
|
||||||
|
|
||||||
## Mandatory feature:
|
## Mandatory feature:
|
||||||
## This feature is required to keep the compatibility with Slint 0.3.0
|
## This feature is required to keep the compatibility with Slint 1.0
|
||||||
## Newer patch version may put current functionality behind a new feature
|
## Newer patch version may put current functionality behind a new feature
|
||||||
## that would be enabled by default only if this feature was added.
|
## that would be enabled by default only if this feature was added.
|
||||||
## [More info in this blog post](https://slint-ui.com/blog/rust-adding-default-cargo-feature.html)
|
## [More info in this blog post](https://slint-ui.com/blog/rust-adding-default-cargo-feature.html)
|
||||||
"compat-0-3-0" = []
|
"compat-1-0" = []
|
||||||
# For compatibility with 0.2
|
|
||||||
compat-0-2-0 = ["compat-0-3-0"]
|
|
||||||
|
|
||||||
## Enable use of the Rust standard library.
|
## Enable use of the Rust standard library.
|
||||||
std = ["i-slint-core/std"]
|
std = ["i-slint-core/std"]
|
||||||
|
|
|
||||||
|
|
@ -231,9 +231,9 @@ See the [documentation of the `Global` trait](Global) for an example.
|
||||||
|
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
|
|
||||||
#[cfg(not(feature = "compat-0-3-0"))]
|
#[cfg(not(feature = "compat-1-0"))]
|
||||||
compile_error!(
|
compile_error!(
|
||||||
"The feature `compat-0-3-0` must be enabled to ensure \
|
"The feature `compat-1-0` must be enabled to ensure \
|
||||||
forward compatibility with future version of this crate"
|
forward compatibility with future version of this crate"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ edition = "2021"
|
||||||
[dependencies.slint]
|
[dependencies.slint]
|
||||||
version = "0.3.4"
|
version = "0.3.4"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["compat-0-3-0", "unsafe-single-threaded", "libm"]
|
features = ["compat-1-0", "unsafe-single-threaded", "libm"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
slint-build = "0.3.4"
|
slint-build = "0.3.4"
|
||||||
|
|
@ -50,7 +50,7 @@ you need to disable the default features.
|
||||||
|
|
||||||
In the snippet above, three features are selected:
|
In the snippet above, three features are selected:
|
||||||
|
|
||||||
* `compat-0-3-0`: We select this feature when disabling the default features. For a detailed explanation see our blog post ["Adding default cargo features without breaking Semantic Versioning"](https://slint-ui.com/blog/rust-adding-default-cargo-feature.html).
|
* `compat-1-0`: We select this feature when disabling the default features. For a detailed explanation see our blog post ["Adding default cargo features without breaking Semantic Versioning"](https://slint-ui.com/blog/rust-adding-default-cargo-feature.html).
|
||||||
* `unsafe-single-threaded`: Slint internally uses Rust's [`thread_local!`](https://doc.rust-lang.org/std/macro.thread_local.html) macro to store global data.
|
* `unsafe-single-threaded`: Slint internally uses Rust's [`thread_local!`](https://doc.rust-lang.org/std/macro.thread_local.html) macro to store global data.
|
||||||
This macro is only available in the Rust Standard Library (std), but not in bare metal environments. As a fallback, the `unsafe-single-threaded`
|
This macro is only available in the Rust Standard Library (std), but not in bare metal environments. As a fallback, the `unsafe-single-threaded`
|
||||||
feature changes Slint to use unsafe static for storage. This way, you guarantee to use Slint API only from a single thread, and not from interrupt handlers.
|
feature changes Slint to use unsafe static for storage. This way, you guarantee to use Slint API only from a single thread, and not from interrupt handlers.
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ crate-type = ["cdylib"]
|
||||||
highlight = ["slint-interpreter/highlight"]
|
highlight = ["slint-interpreter/highlight"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
slint-interpreter = { path = "../../internal/interpreter", default-features = false, features = ["std", "backend-winit", "renderer-winit-femtovg", "compat-0-3-0"] }
|
slint-interpreter = { path = "../../internal/interpreter", default-features = false, features = ["std", "backend-winit", "renderer-winit-femtovg", "compat-1-0"] }
|
||||||
|
|
||||||
vtable = { version = "0.1.6", path="../../helper_crates/vtable" }
|
vtable = { version = "0.1.6", path="../../helper_crates/vtable" }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ path = "main.rs"
|
||||||
name = "carousel"
|
name = "carousel"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
slint = { path = "../../../api/rs/slint", default-features = false, features = ["compat-0-3-0"] }
|
slint = { path = "../../../api/rs/slint", default-features = false, features = ["compat-1-0"] }
|
||||||
mcu-board-support = { path = "../../mcu-board-support", optional = true }
|
mcu-board-support = { path = "../../mcu-board-support", optional = true }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ path = "src/main.rs"
|
||||||
name = "energy_mng"
|
name = "energy_mng"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
slint = { path = "../../api/rs/slint", default-features = false, features = ["compat-0-3-0"] }
|
slint = { path = "../../api/rs/slint", default-features = false, features = ["compat-1-0"] }
|
||||||
mcu-board-support = { path = "../mcu-board-support", optional = true }
|
mcu-board-support = { path = "../mcu-board-support", optional = true }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ esp32-s2-kaluga-1 = ["slint/unsafe-single-threaded", "esp32s2-hal", "embedded-ha
|
||||||
esp32-s3-box = ["slint/unsafe-single-threaded", "esp32s3-hal", "embedded-hal", "xtensa-lx-rt/esp32s3", "esp-alloc", "esp-println/esp32s3", "esp-backtrace/esp32s3", "display-interface", "display-interface-spi", "mipidsi", "embedded-graphics", "slint/libm"]
|
esp32-s3-box = ["slint/unsafe-single-threaded", "esp32s3-hal", "embedded-hal", "xtensa-lx-rt/esp32s3", "esp-alloc", "esp-println/esp32s3", "esp-backtrace/esp32s3", "display-interface", "display-interface-spi", "mipidsi", "embedded-graphics", "slint/libm"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
slint = { version = "=1.0.0", path = "../../api/rs/slint", default-features = false, features = ["compat-0-3-0"] }
|
slint = { version = "=1.0.0", path = "../../api/rs/slint", default-features = false, features = ["compat-1-0"] }
|
||||||
i-slint-core-macros = { version = "=1.0.0", path = "../../internal/core-macros" }
|
i-slint-core-macros = { version = "=1.0.0", path = "../../internal/core-macros" }
|
||||||
|
|
||||||
derive_more = "0.99.5"
|
derive_more = "0.99.5"
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ simulator = ["slint/renderer-winit-software", "slint/backend-winit", "slint/std"
|
||||||
default = ["simulator"]
|
default = ["simulator"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
slint = { path = "../../api/rs/slint", default-features = false, features = ["compat-0-3-0"] }
|
slint = { path = "../../api/rs/slint", default-features = false, features = ["compat-1-0"] }
|
||||||
mcu-board-support = { path = "../mcu-board-support" }
|
mcu-board-support = { path = "../mcu-board-support" }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ rustybuzz = { version = "0.7.0", optional = true }
|
||||||
fontdue = { version = "0.7.1", optional = true }
|
fontdue = { version = "0.7.1", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
slint = { path = "../../api/rs/slint", default-features = false, features = ["std", "compat-0-3-0"] }
|
slint = { path = "../../api/rs/slint", default-features = false, features = ["std", "compat-1-0"] }
|
||||||
i-slint-backend-testing = { path="../backends/testing" }
|
i-slint-backend-testing = { path="../backends/testing" }
|
||||||
rustybuzz = "0.7.0"
|
rustybuzz = "0.7.0"
|
||||||
ttf-parser = "0.18.0"
|
ttf-parser = "0.18.0"
|
||||||
|
|
|
||||||
|
|
@ -19,15 +19,13 @@ path = "lib.rs"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|
||||||
default = ["std", "backend-winit", "renderer-winit-femtovg", "backend-qt", "compat-0-3-0"]
|
default = ["std", "backend-winit", "renderer-winit-femtovg", "backend-qt", "compat-1-0"]
|
||||||
|
|
||||||
## Mandatory feature:
|
## Mandatory feature:
|
||||||
## This feature is required to keep the compatibility with Slint 0.3.0
|
## This feature is required to keep the compatibility with Slint 1.0
|
||||||
## Newer patch version may put current functionality behind a new feature
|
## Newer patch version may put current functionality behind a new feature
|
||||||
## that would be enabled by default only if this feature was added
|
## that would be enabled by default only if this feature was added
|
||||||
"compat-0-3-0" = []
|
"compat-1-0" = []
|
||||||
# For compatibility with 0.2
|
|
||||||
compat-0-2-0 = ["compat-0-3-0"]
|
|
||||||
|
|
||||||
## enable the [`print_diagnostics`] function to show diagnostic in the console output
|
## enable the [`print_diagnostics`] function to show diagnostic in the console output
|
||||||
display-diagnostics = ["i-slint-compiler/display-diagnostics"]
|
display-diagnostics = ["i-slint-compiler/display-diagnostics"]
|
||||||
|
|
|
||||||
|
|
@ -66,9 +66,9 @@ instance.run().unwrap();
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs)]
|
||||||
#![doc(html_logo_url = "https://slint-ui.com/logo/slint-logo-square-light.svg")]
|
#![doc(html_logo_url = "https://slint-ui.com/logo/slint-logo-square-light.svg")]
|
||||||
|
|
||||||
#[cfg(not(feature = "compat-0-3-0"))]
|
#[cfg(not(feature = "compat-1-0"))]
|
||||||
compile_error!(
|
compile_error!(
|
||||||
"The feature `compat-0-3-0` must be enabled to ensure \
|
"The feature `compat-1-0` must be enabled to ensure \
|
||||||
forward compatibility with future version of this crate"
|
forward compatibility with future version of this crate"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ path = "main.rs"
|
||||||
name = "test-driver-interpreter"
|
name = "test-driver-interpreter"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
slint-interpreter = { path = "../../../internal/interpreter", default-features = false, features = ["display-diagnostics", "compat-0-3-0"] }
|
slint-interpreter = { path = "../../../internal/interpreter", default-features = false, features = ["display-diagnostics", "compat-1-0"] }
|
||||||
i-slint-backend-testing = { path = "../../../internal/backends/testing" }
|
i-slint-backend-testing = { path = "../../../internal/backends/testing" }
|
||||||
|
|
||||||
itertools = "0.10"
|
itertools = "0.10"
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ name = "test-driver-rust"
|
||||||
build-time = ["i-slint-compiler", "spin_on"]
|
build-time = ["i-slint-compiler", "spin_on"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
slint = { path = "../../../api/rs/slint", default-features = false, features = ["std", "compat-0-3-0"] }
|
slint = { path = "../../../api/rs/slint", default-features = false, features = ["std", "compat-1-0"] }
|
||||||
i-slint-backend-testing = { path = "../../../internal/backends/testing" }
|
i-slint-backend-testing = { path = "../../../internal/backends/testing" }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ path = "main.rs"
|
||||||
name = "test-driver-screenshot"
|
name = "test-driver-screenshot"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
slint = { path = "../../api/rs/slint", default-features = false, features = ["std", "compat-0-3-0"] }
|
slint = { path = "../../api/rs/slint", default-features = false, features = ["std", "compat-1-0"] }
|
||||||
i-slint-core = { version = "=1.0.0", path = "../../internal/core" }
|
i-slint-core = { version = "=1.0.0", path = "../../internal/core" }
|
||||||
i-slint-backend-testing = { path = "../../internal/backends/testing" }
|
i-slint-backend-testing = { path = "../../internal/backends/testing" }
|
||||||
image = { version = "0.24.0", default-features = false, features = ["png", "jpeg"] }
|
image = { version = "0.24.0", default-features = false, features = ["png", "jpeg"] }
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ rowan = "0.15.5"
|
||||||
|
|
||||||
# for the preview
|
# for the preview
|
||||||
i-slint-core = { version = "=1.0.0", path = "../../internal/core", optional = true }
|
i-slint-core = { version = "=1.0.0", path = "../../internal/core", optional = true }
|
||||||
slint-interpreter = { version = "=1.0.0", path = "../../internal/interpreter", default-features = false, features = ["compat-0-3-0", "highlight"], optional = true }
|
slint-interpreter = { version = "=1.0.0", path = "../../internal/interpreter", default-features = false, features = ["compat-1-0", "highlight"], optional = true }
|
||||||
i-slint-backend-selector = { version = "=1.0.0", path="../../internal/backends/selector", optional = true }
|
i-slint-backend-selector = { version = "=1.0.0", path="../../internal/backends/selector", optional = true }
|
||||||
|
|
||||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ default = ["backend-qt", "backend-winit", "renderer-winit-femtovg"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
i-slint-core = { version = "=1.0.0", path="../../internal/core" }
|
i-slint-core = { version = "=1.0.0", path="../../internal/core" }
|
||||||
slint-interpreter = { version = "=1.0.0", path = "../../internal/interpreter", default-features = false, features = ["display-diagnostics", "compat-0-3-0"] }
|
slint-interpreter = { version = "=1.0.0", path = "../../internal/interpreter", default-features = false, features = ["display-diagnostics", "compat-1-0"] }
|
||||||
i-slint-backend-selector = { version = "=1.0.0", path="../../internal/backends/selector" }
|
i-slint-backend-selector = { version = "=1.0.0", path="../../internal/backends/selector" }
|
||||||
|
|
||||||
vtable = { version = "0.1.6", path="../../helper_crates/vtable" }
|
vtable = { version = "0.1.6", path="../../helper_crates/vtable" }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue