updating msrv to 1.54

Added a "get out of jail free" card in the min-const-generics feature
This commit is contained in:
Jack Mac 2021-09-13 13:03:13 -04:00
parent e1521dd35f
commit 04af6ab69a
4 changed files with 34 additions and 24 deletions

View File

@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
rust: ["1.48"]
rust: ["1.54"]
env:
RUSTFLAGS: -D warnings
@ -60,7 +60,7 @@ jobs:
strategy:
matrix:
rust: ["1.48"]
rust: ["1.54"]
steps:
- name: Checkout
@ -84,7 +84,7 @@ jobs:
rust:
- stable
- beta
- "1.48"
- "1.54"
os:
- ubuntu-latest
- macos-latest

View File

@ -2,8 +2,10 @@
## [Unreleased]
- BREAKING: MSRV is now **1.54**. This is gives us access to min-const-generics, which we use in a few places, but will gradually use more. Because this is the first time we've bumped MSRV intentionally, we have added a new feature `min-const-generics`, which is _enabled by default_. If you are pre-1.54, you can hang onto this update by disabling that feature. In our next update, this feature will be removed and we will commit to our MSRVs going forward.
- Removed automatically adding default features for `imgui-winit-support`
with the exception of the current default winit feature/dep version. Additionally, that version was updated to 0.25. If you want to not have the default features of winit with 0.25, set `default-features = false` and add `winit-25` as a normal feature. Thank you to @dzil123 for the work [implementing this here](https://github.com/imgui-rs/imgui-rs/pull/477)!
with the exception of the current default winit feature/dep version. Additionally, that version was updated to 0.25. If you want to not have the default features of winit with 0.25, set `default-features = false` and add `winit-25` as a normal feature. Thank you to @dzil123 for the work [implementing this here](https://github.com/imgui-rs/imgui-rs/pull/477)!
- Added an `imgui-glow-renderer` which targets `glow 0.10`. Before release, this will be updated to target current `0.11` glow when further features are added. Thank you to @jmaargh for the work [implementing this here](https://github.com/imgui-rs/imgui-rs/pull/495)!
@ -52,6 +54,7 @@ with the exception of the current default winit feature/dep version. Additionall
- For example `ui.is_key_released(imgui::Key::A)` is same as `ui.is_key_index_released(winit::events::VirtualKeyCode::A as i32)` when using the winit backend
- Full (32-bit) unicode support is enabled in Dear Imgui (e.g. `-DIMGUI_USE_WCHAR32` is enabled now). Previously UTF-16 was used internally.
- BREAKING: Some parts of the font atlas code now use `char` (or `u32`) instead of `u16` to reflect this.
- Note: `u32` is used over `char` in some situations, such as when surrogates are allowed
- BREAKING (sorta): Dear Imgui now will use 32 bits for character data internally. This impacts the ABI, including sizes of structs and such, and can break some low level or advanced use cases:

View File

@ -27,13 +27,13 @@ Window::new(im_str!("Hello world"))
## Main library crates
* imgui: High-level safe API
* imgui-glium-renderer: Renderer implementation that uses the `glium` crate
* imgui-gfx-renderer: Renderer implementation that uses the `gfx` crate (*not
the new gfx-hal crate*)
* imgui-winit-support: Backend platform implementation that uses the `winit`
- imgui: High-level safe API
- imgui-glium-renderer: Renderer implementation that uses the `glium` crate
- imgui-gfx-renderer: Renderer implementation that uses the `gfx` crate (_not
the new gfx-hal crate_)
- imgui-winit-support: Backend platform implementation that uses the `winit`
crate (latest by default, but earlier versions are supported via feature flags)
* imgui-sys: Low-level unsafe API (automatically generated)
- imgui-sys: Low-level unsafe API (automatically generated)
## Features
@ -49,6 +49,10 @@ Window::new(im_str!("Hello world"))
- Easy integration with winit (backend platform)
- Optional support for the freetype font rasterizer
## Minimum Support Rust Version (MSRV)
The MSRV for `imgui-rs` and all of the backend crates is **1.54**. We update our MSRV periodically, and issue a minor bump for it.
## Choosing a backend platform and a renderer
Almost every application that uses imgui-rs needs two additional components in
@ -57,18 +61,18 @@ addition to the main `imgui` crate: a backend platform, and a renderer.
The backend platform is responsible for integrating imgui-rs with the operating
system and its window management. Its responsibilities include the following:
* Handling input events (e.g. keyboard, mouse) and updating imgui-rs state
- Handling input events (e.g. keyboard, mouse) and updating imgui-rs state
accordingly
* Passing information about the OS window (e.g. size, DPI factor) to imgui-rs
* Updating the OS-side mouse cursor when imgui-rs requests it
- Passing information about the OS window (e.g. size, DPI factor) to imgui-rs
- Updating the OS-side mouse cursor when imgui-rs requests it
The renderer is responsible for taking generic, renderer-agnostic *draw lists*
The renderer is responsible for taking generic, renderer-agnostic _draw lists_
generated by imgui-rs, and rendering them using some graphics API. Its
responsibilities include the following:
* Rendering using vertex/index buffers and command lists
* Handling of DPI factors and scissor rects
* Texture management
- Rendering using vertex/index buffers and command lists
- Handling of DPI factors and scissor rects
- Texture management
The most tested platform/renderer combination is `imgui-glium-renderer` +
`glium` + `imgui-winit-support` + `winit`, but this is not the only possible
@ -107,7 +111,7 @@ cargo run --example gfx_hello_world
cargo run --example gfx_test_window
```
Note to Windows users: You will need to use the *MSVC ABI* version of the Rust
Note to Windows users: You will need to use the _MSVC ABI_ version of the Rust
compiler along with its associated
[dependencies](https://www.rust-lang.org/en-US/downloads.html#win-foot) to
build this libary and run the examples.
@ -118,10 +122,10 @@ build this libary and run the examples.
2. Make sure you're using the latest stable Rust
3. Run rustfmt to guarantee code style conformance
```bash
rustup component add rustfmt
cargo fmt
```
```bash
rustup component add rustfmt
cargo fmt
```
4. Open a pull request in Github
@ -129,8 +133,8 @@ build this libary and run the examples.
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.org/licenses/MIT)
- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.org/licenses/MIT)
at your option.

View File

@ -18,8 +18,11 @@ imgui-sys = { version = "0.7.0", path = "../imgui-sys" }
parking_lot = "0.11"
[features]
default = ["min-const-generics"]
wasm = ["imgui-sys/wasm"]
freetype = ["imgui-sys/freetype"]
min-const-generics = []
[dev-dependencies]
memoffset = "0.6"