Skip to content

Commit 4d5a1d9

Browse files
committed
Prepare for 0.37.0
1 parent 48509ea commit 4d5a1d9

File tree

4 files changed

+42
-26
lines changed

4 files changed

+42
-26
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "sdl2"
33
description = "SDL2 bindings for Rust"
44
repository = "https://github.com/Rust-SDL2/rust-sdl2"
55
documentation = "https://rust-sdl2.github.io/rust-sdl2/sdl2/"
6-
version = "0.36.0"
6+
version = "0.37.0"
77
license = "MIT"
88
authors = [ "Tony Aldridge <[email protected]>", "Cobrand <[email protected]>"]
99
keywords = ["SDL", "windowing", "graphics", "api", "engine"]
@@ -22,7 +22,7 @@ lazy_static = "1.4.0"
2222

2323
[dependencies.sdl2-sys]
2424
path = "sdl2-sys"
25-
version = "^0.36.0"
25+
version = "^0.37.0"
2626

2727
[dependencies.c_vec]
2828
# allow both 1.* and 2.0 versions

README.md

+24-21
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,33 @@
22

33
Bindings for SDL2 in Rust
44

5-
### [Changelog for 0.36.0](changelog.md#v0360)
5+
### [Changelog for 0.37.0](changelog.md#v0370)
66

77
# Overview
88

99
Rust-SDL2 is a library for talking to the new SDL2.0 libraries from Rust.
1010
Low-level C components are wrapped in Rust code to make them more idiomatic and
1111
abstract away inappropriate manual memory management.
1212

13-
Rust-SDL2 uses the MIT license.
13+
Rust-SDL2 uses the MIT license, but SDL2 itselfais in under the zlib license.
1414

15-
If you want a library compatible with earlier versions of SDL, please see
16-
[here][early-sdl]
15+
## Available rust features
1716

18-
# Documentation
19-
20-
* [latest crate update documentation](https://docs.rs/sdl2/).
21-
* [master documentation](https://rust-sdl2.github.io/rust-sdl2/sdl2/).
17+
* `gfx` to link against SDL2\_gfx and have access to gfx features
18+
* `image` to link against SDL2\_image and have access to image reading and writing features
19+
* `mixer` to link against SDL2\_mixer and have access to sound mixing features
20+
* `ttf` to link against SDL2\_ttf and have access to various font features
21+
* `unsafe-textures` to not have a lifetime in `Texture` structs. Texture are only freed when the program exits, or can be done manually through `unsafe`.
22+
* `use-bindgen` to customize bindings instead of using pre-generated `sdl_bindings` which were created from a Linux environment. It generates your own custom SDL2 bindings, tailored to your distro. Useful for specific window-related scenarios.
23+
* `use-vcpkg` to pull SDL2 from vcpkg instead of looking in your system.
24+
* `use-pkgconfig` use pkg-config to detect where your library is located on your system. Mostly useful on unix systems for static linking.
25+
* `static-link` to link to SDL2 statically instead of dynamically.
26+
* `use_mac_framework` to use SDL2 from a Framework, on macOS only
27+
* `bundled`, which pulls the SDL repository and compiles it from source. More information below.
2228

23-
The following features are enabled in the documentation:
24-
* gfx
25-
* image
26-
* mixer
27-
* ttf
29+
# Documentation
2830

29-
The `unsafe_textures` feature is not documented online, you can use `cargo doc` to generate your own documentation
30-
with this feature enabled.
31+
[Read the documentation here](https://docs.rs/sdl2/).
3132

3233
# Requirements
3334

@@ -37,7 +38,7 @@ We currently target the latest stable release of Rust.
3738

3839
## *SDL2.0 development libraries*
3940

40-
SDL2 >= 2.0.14 is recommended to use these bindings; below 2.0.14, you may experience link-time errors as some functions are used here but are not defined in SDL2. If you experience this issue because you are on a LTS machine (for instance, Ubuntu 12.04 or Ubuntu 14.04), we definitely recommend you to use the feature "bundled" which will compile the lastest stable version of SDL2 for your project.
41+
SDL2 >= 2.0.26 is recommended to use these bindings; below 2.0.26, you may experience link-time errors as some functions are used here but are not defined in SDL2. If you experience this issue because you are on a LTS machine (for instance, Ubuntu), we definitely recommend you to use the feature "bundled" which will compile the lastest stable version of SDL2 for your project.
4142

4243
### "Bundled" Feature
4344

@@ -53,6 +54,8 @@ println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path");
5354
println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN");
5455
```
5556

57+
**This ONLY works with SDL2, NOT SDL2_image, SDL2_mixer, SDL2_ttf, SDL2_gfx`
58+
5659
### Linux
5760
Install these through your favourite package management tool, or via
5861
http://www.libsdl.org/
@@ -334,14 +337,14 @@ add the following your `Cargo.toml`:
334337

335338
```toml
336339
[dependencies.sdl2]
337-
version = "0.36"
340+
version = "0.37"
338341
default-features = false
339342
features = ["ttf","image","gfx","mixer","static-link","use-vcpkg"]
340343

341344
[package.metadata.vcpkg]
342345
dependencies = ["sdl2", "sdl2-image[libjpeg-turbo,tiff,libwebp]", "sdl2-ttf", "sdl2-gfx", "sdl2-mixer"]
343346
git = "https://github.com/microsoft/vcpkg"
344-
rev = "261c458af6e3eed5d099144aff95d2b5035f656b"
347+
rev = "2024.05.24" # release 2024.05.24 # to check for a new one, check https://github.com/microsoft/vcpkg/releases
345348

346349
[package.metadata.vcpkg.target]
347350
x86_64-pc-windows-msvc = { triplet = "x64-windows-static-md" }
@@ -356,7 +359,7 @@ download through Crates.io:
356359

357360
```toml
358361
[dependencies]
359-
sdl2 = "0.36"
362+
sdl2 = "0.37"
360363
```
361364

362365
Alternatively, pull it from GitHub to obtain the latest version from master
@@ -377,7 +380,7 @@ adding this instead:
377380

378381
```toml
379382
[dependencies.sdl2]
380-
version = "0.36"
383+
version = "0.37"
381384
default-features = false
382385
features = ["ttf","image","gfx","mixer"]
383386
```
@@ -654,7 +657,7 @@ fn main() {
654657

655658
```toml
656659
[dependencies.sdl2]
657-
version = "0.32"
660+
version = "0.37"
658661
features = ["raw-window-handle"]
659662
```
660663

changelog.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,28 @@
11
In this file will be listed the changes, especially the breaking ones that one should be careful of
22
when upgrading from a version of rust-sdl2 to another.
33

4-
### Unreleased
4+
### v0.37.0
5+
6+
[PR #1406](https://github.com/Rust-SDL2/rust-sdl2/pull/1406) Update bindings to SDL 2.0.26, add Event.is\_touch() for mouse events, upgrade wgpu to 0.20 in examples
7+
8+
[PR #1398](https://github.com/Rust-SDL2/rust-sdl2/pull/1398) Fix bug in rect.shift logic
9+
510
[PR #1404](https://github.com/Rust-SDL2/rust-sdl2/pull/1404) Make `SdlDrop` a zero sized type.
611

12+
[PR #1394](https://github.com/Rust-SDL2/rust-sdl2/pull/1394) Do not pull the SDL repository if not using bundled in build.rs
13+
14+
[PR #1394](https://github.com/Rust-SDL2/rust-sdl2/pull/1394) Fix static linking
15+
716
[PR #1389](https://github.com/Rust-SDL2/rust-sdl2/pull/1389) Fix some undefined behavior.
817

918
[PR #1378](https://github.com/Rust-SDL2/rust-sdl2/pull/1378) **BREAKING CHANGE** Change `Keycode` to be a struct rather than an enum. Fix `Keycode::from_scancode` for non-QWERTY keyboard layouts.
1019

1120
[PR #1390](https://github.com/Rust-SDL2/rust-sdl2/pull/1390) Apply clippy fixes, fix deprecations and other code quality improvements.
1221

22+
[PR #1385](https://github.com/Rust-SDL2/rust-sdl2/pull/1385) Upgrade raw-window-handle to 0.6.0
23+
24+
[PR #1380](https://github.com/Rust-SDL2/rust-sdl2/pull/1380) Add controller vendor\_id() and product\_id()
25+
1326
[PR #1368](https://github.com/Rust-SDL2/rust-sdl2/pull/1368) Remove unnecessary unsafe in Window interface. Make Window `Clone`.
1427

1528
[PR #1366](https://github.com/Rust-SDL2/rust-sdl2/pull/1366) Add Primary Selection bindings.

sdl2-sys/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
name = "sdl2-sys"
44
description = "Raw SDL2 bindings for Rust, used internally rust-sdl2"
55
repository = "https://github.com/rust-sdl2/rust-sdl2"
6-
version = "0.36.0"
7-
authors = ["Tony Aldridge <[email protected]>"]
6+
version = "0.37.0"
7+
authors = ["Tony Aldridge <[email protected]>", "Cobrand <[email protected]>"]
88
keywords = ["SDL", "windowing", "graphics", "ffi"]
99
categories = ["rendering","external-ffi-bindings","game-engines","multimedia"]
1010
license = "MIT AND Zlib"

0 commit comments

Comments
 (0)