Skip to content

Commit cc7715d

Browse files
committed
pre-release rites
1 parent fb16fbb commit cc7715d

File tree

8 files changed

+46
-23
lines changed

8 files changed

+46
-23
lines changed

.github/workflows/libloading.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
rust_toolchain: [nightly, stable, 1.81.0]
18+
rust_toolchain: [nightly, stable, 1.88.0]
1919
os: [ubuntu-latest, windows-latest, macOS-latest]
2020
timeout-minutes: 20
2121
steps:
@@ -24,7 +24,7 @@ jobs:
2424
- run: rustup default ${{ matrix.rust_toolchain }}
2525
- run: rustup component add clippy
2626
- run: cargo update -p libc --precise 0.2.155
27-
if: ${{ matrix.rust_toolchain == '1.81.0' }}
27+
if: ${{ matrix.rust_toolchain == '1.88.0' }}
2828
- run: cargo clippy
2929
- run: cargo test -- --nocapture
3030
- run: cargo test --release -- --nocapture

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "libloading"
33
# When bumping
44
# * Don’t forget to add an entry to `src/changelog.rs`
55
# * If bumping to an incompatible version, adjust the documentation in `src/lib.rs`
6-
version = "0.8.9"
6+
version = "0.9.0"
77
authors = ["Simonas Kazlauskas <libloading@kazlauskas.me>"]
88
license = "ISC"
99
repository = "https://github.com/nagisa/rust_libloading/"
@@ -12,8 +12,8 @@ readme = "README.mkd"
1212
description = "Bindings around the platform's dynamic library loading primitives with greatly improved memory safety."
1313
keywords = ["dlopen", "load", "shared", "dylib"]
1414
categories = ["api-bindings"]
15-
rust-version = "1.81.0"
16-
edition = "2015"
15+
rust-version = "1.88.0"
16+
edition = "2021"
1717

1818
[features]
1919
default = ["std"]

src/changelog.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
//! The change log.
22
3+
/// Release 0.9.0 (2025-11-05)
4+
///
5+
/// ## Breaking changes
6+
///
7+
/// * MSRV has been increased to 1.88.0;
8+
/// * This release adds a `std` feature. Most functionality remains available with this feature
9+
/// disabled, but anything involving `OsStr`, `OsString`, `Path` or `PathBuf` is only available
10+
/// with `std` feature enabled. If you are depending on `libloading` with `no-default-features`
11+
/// set to true, you may see compilation errors. Running with `std` feature enabled is still
12+
/// the strongly recommended option. no-std functionality has been contributed in [#184];
13+
/// * As a result of the change above, functions that previously using `AsRef<OsStr>` to
14+
/// describe the library path now require an implementor of [`AsFilename`](crate::AsFilename)
15+
/// instead. `AsFilename` has been implemented for the most likely types used previously. Please
16+
/// file an issue if you rely on a type that no longer works.
17+
///
18+
/// [#184]: https://github.com/nagisa/rust_libloading/pull/184
19+
///
20+
/// ## Non-breaking changes
21+
///
22+
/// * Symbol lookups via `Library::get` and related functions can now use a wider variety of string
23+
/// types, including `&CStr`. This, among other things, means that `c"symbol"` literals can be
24+
/// used without incurring any additional null-byte checking overhead or reallocations that were
25+
/// necessary for `&[u8]` argument used previously to support `b"literals"`. `&[u8]` is still
26+
/// accepted. This has been contributed in [#174] and [#184].
27+
///
28+
/// [#174]: https://github.com/nagisa/rust_libloading/pull/174
29+
///
30+
pub mod r0_9_0 {}
31+
332
/// Release 0.8.9 (2025-09-17)
433
///
534
/// ## Non-breaking changes

src/os/unix/consts.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ mod posix {
5454

5555
#[cfg(any(not(libloading_docs), unix))]
5656
mod posix {
57-
extern crate cfg_if;
58-
use self::cfg_if::cfg_if;
57+
use cfg_if::cfg_if;
5958
use super::c_int;
6059
cfg_if! {
6160
if #[cfg(target_os = "haiku")] {

src/os/unix/mod.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
use crate::as_filename::SealedFilename;
2-
use crate::as_symbol_name::SealedSymbolName;
3-
1+
use crate::as_filename::{SealedFilename, AsFilename};
2+
use crate::as_symbol_name::{SealedSymbolName, AsSymbolName};
43
pub use self::consts::*;
5-
use as_filename::AsFilename;
6-
use as_symbol_name::AsSymbolName;
74
use core::ffi::CStr;
85
use core::ptr::null;
96
use core::{fmt, marker, mem, ptr};
10-
use util::ensure_compatible_types;
7+
use crate::util::ensure_compatible_types;
118

129
mod consts;
1310

@@ -278,6 +275,8 @@ impl Library {
278275
/// consider using the [`Library::get_singlethreaded`] call.
279276
#[inline(always)]
280277
pub unsafe fn get<T>(&self, symbol: impl AsSymbolName) -> Result<Symbol<T>, crate::Error> {
278+
#[cfg_attr(libloading_docs, allow(unused_extern_crates))]
279+
#[cfg(libloading_docs)]
281280
extern crate cfg_if;
282281
cfg_if::cfg_if! {
283282
// These targets are known to have MT-safe `dlerror`.

src/os/windows/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ mod windows_imports {
1515
}
1616

1717
use self::windows_imports::*;
18-
use as_filename::{SealedFilename, AsFilename};
19-
use as_symbol_name::{AsSymbolName, SealedSymbolName};
18+
use crate::as_filename::{AsFilename, SealedFilename};
19+
use crate::as_symbol_name::{AsSymbolName, SealedSymbolName};
20+
use crate::util::ensure_compatible_types;
2021
use core::{fmt, marker, mem, ptr};
21-
use util::ensure_compatible_types;
2222

2323
/// The platform-specific counterpart of the cross-platform [`Library`](crate::Library).
2424
pub struct Library(HMODULE);

src/safe.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ use super::os::unix as imp;
55
#[cfg(all(not(libloading_docs), windows))]
66
use super::os::windows as imp;
77
use super::Error;
8-
use as_filename::AsFilename;
9-
use as_symbol_name::AsSymbolName;
8+
use crate::as_filename::AsFilename;
9+
use crate::as_symbol_name::AsSymbolName;
1010
use core::fmt;
1111
use core::marker;
1212
use core::ops;

tests/constants.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
extern crate libc;
2-
extern crate libloading;
3-
extern crate static_assertions;
4-
51
#[cfg(all(test, unix))]
62
mod unix {
7-
use super::static_assertions::const_assert_eq;
3+
use static_assertions::const_assert_eq;
84

95
const_assert_eq!(libloading::os::unix::RTLD_LOCAL, libc::RTLD_LOCAL);
106
const_assert_eq!(libloading::os::unix::RTLD_GLOBAL, libc::RTLD_GLOBAL);

0 commit comments

Comments
 (0)