1 | //! The change log. |
2 | |
3 | /// Release 0.8.3 (2024-03-05) |
4 | /// |
5 | /// ## Non-breaking changes |
6 | /// |
7 | /// A `dev-dependency` on `windows-sys` that was unconditionally introduced in |
8 | /// [0.8.2](r0_8_2) has been made conditional. |
9 | pub mod r0_8_3 {} |
10 | |
11 | /// Release 0.8.2 (2024-03-01) |
12 | /// |
13 | /// ## (Potentially) breaking changes |
14 | /// |
15 | /// MSRV has been increased to 1.56.0. Since both rustc versions are ancient, this has been deemed |
16 | /// to not be breaking enough to warrant a semver-breaking release of libloading. If you're stick |
17 | /// with a version of rustc older than 1.56.0, lock `libloading` dependency to `0.8.1`. |
18 | /// |
19 | /// ## Non-breaking changes |
20 | /// |
21 | /// * The crate switches the dependency on `windows-sys` to a `windows-target` one for Windows |
22 | /// bindings. In order to enable this `libloading` defines any bindings necessary for its operation |
23 | /// internally, just like has been done for `unix` targets. This should result in leaner dependency |
24 | /// trees. |
25 | /// * `os::unix::with_dlerror` has been exposed for the users who need to invoke `dl*` family of |
26 | /// functions manually. |
27 | pub mod r0_8_2 {} |
28 | |
29 | /// Release 0.8.1 (2023-09-30) |
30 | /// |
31 | /// ## Non-breaking changes |
32 | /// |
33 | /// * Support for GNU Hurd. |
34 | pub mod r0_8_1 {} |
35 | |
36 | /// Release 0.8.0 (2023-04-11) |
37 | /// |
38 | /// ## (Potentially) breaking changes |
39 | /// |
40 | /// * `winapi` dependency has been replaced with `windows-sys`. |
41 | /// * As a result the MSRV has been increased to 1.48. |
42 | /// |
43 | /// ## Non-breaking changes |
44 | /// |
45 | /// * Support for the QNX Neutrino target has been added. |
46 | pub mod r0_8_0 {} |
47 | |
48 | /// Release 0.7.4 (2022-11-07) |
49 | /// |
50 | /// This release has no functional changes. |
51 | /// |
52 | /// `RTLD_LAZY`, `RTLD_GLOBAL` and `RTLD_LOCAL` constants have been implemented for AIX platforms. |
53 | pub mod r0_7_4 {} |
54 | |
55 | /// Release 0.7.3 (2022-01-15) |
56 | /// |
57 | /// This release has no functional changes. |
58 | /// |
59 | /// In this release the `docsrs` `cfg` has been renamed to `libloading_docs` to better reflect that |
60 | /// this `cfg` is intended to be only used by `libloading` and only specifically for the invocation |
61 | /// of `rustdoc` when documenting `libloading`. Setting this `cfg` in any other situation is |
62 | /// unsupported and will not work. |
63 | pub mod r0_7_3 {} |
64 | |
65 | /// Release 0.7.2 (2021-11-14) |
66 | /// |
67 | /// Cargo.toml now specifies the MSRV bounds, which enables tooling to report an early failure when |
68 | /// the version of the toolchain is insufficient. Refer to the [min-rust-version RFC] and its |
69 | /// [tracking issue]. |
70 | /// |
71 | /// [min-rust-version RFC]: https://rust-lang.github.io/rfcs/2495-min-rust-version.html |
72 | /// [tracking issue]: https://github.com/rust-lang/rust/issues/65262 |
73 | /// |
74 | /// Additionally, on platforms `libloading` has no support (today: `not(any(unix, windows))`), we |
75 | /// will no longer attempt to implement the cross-platform `Library` and `Symbol` types. This makes |
76 | /// `libloading` compile on targets such as `wasm32-unknown-unknown` and gives ability to the |
77 | /// downstream consumers of this library to decide how they want to handle the absence of the |
78 | /// library loading implementation in their code. One of such approaches could be depending on |
79 | /// `libloading` itself optionally as such: |
80 | /// |
81 | /// ```toml |
82 | /// [target.'cfg(any(unix, windows))'.dependencies.libloading] |
83 | /// version = "0.7" |
84 | /// ``` |
85 | pub mod r0_7_2 {} |
86 | |
87 | /// Release 0.7.1 (2021-10-09) |
88 | /// |
89 | /// Significantly improved the consistency and style of the documentation. |
90 | pub mod r0_7_1 {} |
91 | |
92 | /// Release 0.7.0 (2021-02-06) |
93 | /// |
94 | /// ## Breaking changes |
95 | /// |
96 | /// ### Loading functions are now `unsafe` |
97 | /// |
98 | /// A number of associated methods involved in loading a library were changed to |
99 | /// be `unsafe`. The affected functions are: [`Library::new`], [`os::unix::Library::new`], |
100 | /// [`os::unix::Library::open`], [`os::windows::Library::new`], |
101 | /// [`os::windows::Library::load_with_flags`]. This is the most prominent breaking change in this |
102 | /// release and affects majority of the users of `libloading`. |
103 | /// |
104 | /// In order to see why it was necessary, consider the following snippet of C++ code: |
105 | /// |
106 | /// ```c++ |
107 | /// #include <vector> |
108 | /// #include <iostream> |
109 | /// |
110 | /// static std::vector<unsigned int> UNSHUU = { 1, 2, 3 }; |
111 | /// |
112 | /// int main() { |
113 | /// std::cout << UNSHUU[0] << UNSHUU[1] << UNSHUU[2] << std::endl; // Prints 123 |
114 | /// return 0; |
115 | /// } |
116 | /// ``` |
117 | /// |
118 | /// The `std::vector` type, much like in Rust's `Vec`, stores its contents in a buffer allocated on |
119 | /// the heap. In this example the vector object itself is stored and initialized as a static |
120 | /// variable – a compile time construct. The heap, on the other hand, is a runtime construct. And |
121 | /// yet the code works exactly as you'd expect – the vector contains numbers 1, 2 and 3 stored in |
122 | /// a buffer on heap. So, _what_ makes it work out, exactly? |
123 | /// |
124 | /// Various executable and shared library formats define conventions and machinery to execute |
125 | /// arbitrary code when a program or a shared library is loaded. On systems using the PE format |
126 | /// (e.g. Windows) this is available via the optional `DllMain` initializer. Various systems |
127 | /// utilizing the ELF format take a sightly different approach of maintaining an array of function |
128 | /// pointers in the `.init_array` section. A very similar mechanism exists on systems that utilize |
129 | /// the Mach-O format. |
130 | /// |
131 | /// For the C++ program above, the object stored in the `UNSHUU` global variable is constructed |
132 | /// by code run as part of such an initializer routine. This initializer is run before the entry |
133 | /// point (the `main` function) is executed, allowing for this magical behaviour to be possible. |
134 | /// Were the C++ code built as a shared library instead, the initialization routines would run as |
135 | /// the resulting shared library is loaded. In case of `libloading` – during the call to |
136 | /// `Library::new` and other methods affected by this change. |
137 | /// |
138 | /// These initialization (and very closely related termination) routines can be utilized outside of |
139 | /// C++ too. Anybody can build a shared library in variety of different programming languages and |
140 | /// set up the initializers to execute arbitrary code. Potentially code that does all sorts of |
141 | /// wildly unsound stuff. |
142 | /// |
143 | /// The routines are executed by components that are an integral part of the operating system. |
144 | /// Changing or controlling the operation of these components is infeasible. With that in |
145 | /// mind, the initializer and termination routines are something anybody loading a library must |
146 | /// carefully evaluate the libraries loaded for soundness. |
147 | /// |
148 | /// In practice, a vast majority of the libraries can be considered a good citizen and their |
149 | /// initialization and termination routines, if they have any at all, can be trusted to be sound. |
150 | /// |
151 | /// Also see: [issue #86]. |
152 | /// |
153 | /// ### Better & more consistent default behaviour on UNIX systems |
154 | /// |
155 | /// On UNIX systems the [`Library::new`], [`os::unix::Library::new`] and |
156 | /// [`os::unix::Library::this`] methods have been changed to use |
157 | /// <code>[RTLD_LAZY] | [RTLD_LOCAL]</code> as the default set of loader options (previously: |
158 | /// [`RTLD_NOW`]). This has a couple benefits. Namely: |
159 | /// |
160 | /// * Lazy binding is generally quicker to execute when only a subset of symbols from a library are |
161 | /// used and is typically the default when neither `RTLD_LAZY` nor `RTLD_NOW` are specified when |
162 | /// calling the underlying `dlopen` API; |
163 | /// * On most UNIX systems (macOS being a notable exception) `RTLD_LOCAL` is the default when |
164 | /// neither `RTLD_LOCAL` nor [`RTLD_GLOBAL`] are specified. The explicit setting of the |
165 | /// `RTLD_LOCAL` flag makes this behaviour consistent across platforms. |
166 | /// |
167 | /// ### Dropped support for Windows XP/Vista |
168 | /// |
169 | /// The (broken) support for Windows XP and Windows Vista environments was removed. This was |
170 | /// prompted primarily by a similar policy change in the [Rust |
171 | /// project](https://github.com/rust-lang/compiler-team/issues/378) but also as an acknowledgement |
172 | /// to the fact that `libloading` never worked in these environments anyway. |
173 | /// |
174 | /// ### More accurate error variant names |
175 | /// |
176 | /// Finally, the `Error::LoadLibraryW` renamed to [`Error::LoadLibraryExW`] to more accurately |
177 | /// represent the underlying API that's failing. No functional changes as part of this rename |
178 | /// intended. |
179 | /// |
180 | /// [issue #86]: https://github.com/nagisa/rust_libloading/issues/86 |
181 | /// [`Library::new`]: crate::Library::new |
182 | /// [`Error::LoadLibraryExW`]: crate::Error::LoadLibraryExW |
183 | /// [`os::unix::Library::this`]: crate::os::unix::Library::this |
184 | /// [`os::unix::Library::new`]: crate::os::unix::Library::new |
185 | /// [`os::unix::Library::open`]: crate::os::unix::Library::new |
186 | /// [`os::windows::Library::new`]: crate::os::windows::Library::new |
187 | /// [`os::windows::Library::load_with_flags`]: crate::os::windows::Library::load_with_flags |
188 | /// [`RTLD_NOW`]: crate::os::unix::RTLD_NOW |
189 | /// [RTLD_LAZY]: crate::os::unix::RTLD_LAZY |
190 | /// [RTLD_LOCAL]: crate::os::unix::RTLD_LOCAL |
191 | /// [`RTLD_GLOBAL`]: crate::os::unix::RTLD_GLOBAL |
192 | pub mod r0_7_0 {} |
193 | |
194 | /// Release 0.6.7 (2021-01-14) |
195 | /// |
196 | /// * Added a [`os::windows::Library::open_already_loaded`] to obtain a handle to a library that |
197 | /// must already be loaded. There is no portable equivalent for all UNIX targets. Users who do not |
198 | /// care about portability across UNIX platforms may use [`os::unix::Library::open`] with |
199 | /// `libc::RTLD_NOLOAD`; |
200 | /// |
201 | /// [`os::windows::Library::open_already_loaded`]: crate::os::windows::Library::open_already_loaded |
202 | /// [`os::unix::Library::open`]: crate::os::unix::Library::open |
203 | pub mod r0_6_7 {} |
204 | |
205 | /// Release 0.6.6 (2020-12-03) |
206 | /// |
207 | /// * Fix a double-release of resources when [`Library::close`] or [`os::windows::Library::close`] |
208 | /// is used on Windows. |
209 | /// |
210 | /// [`Library::close`]: crate::Library::close |
211 | /// [`os::windows::Library::close`]: crate::os::windows::Library::close |
212 | pub mod r0_6_6 {} |
213 | |
214 | /// Release 0.6.5 (2020-10-23) |
215 | /// |
216 | /// * Upgrade cfg-if 0.1 to 1.0 |
217 | pub mod r0_6_5 {} |
218 | |
219 | /// Release 0.6.4 (2020-10-10) |
220 | /// |
221 | /// * Remove use of `build.rs` making it easier to build `libloading` without cargo. It also |
222 | /// almost halves the build time of this crate. |
223 | pub mod r0_6_4 {} |
224 | |
225 | /// Release 0.6.3 (2020-08-22) |
226 | /// |
227 | /// * Improve documentation, allowing to view all of the os-specific functionality from |
228 | /// documentation generated for any target; |
229 | /// * Add [`os::windows::Library::this`]; |
230 | /// * Added constants to use with OS-specific `Library::open`; |
231 | /// * Add [`library_filename`]. |
232 | /// |
233 | /// [`os::windows::Library::this`]: crate::os::windows::Library::this |
234 | /// [`library_filename`]: crate::library_filename |
235 | pub mod r0_6_3 {} |
236 | |
237 | /// Release 0.6.2 (2020-05-06) |
238 | /// |
239 | /// * Fixed building of this library on Illumos. |
240 | pub mod r0_6_2 {} |
241 | |
242 | /// Release 0.6.1 (2020-04-15) |
243 | /// |
244 | /// * Introduced a new method [`os::windows::Library::load_with_flags`]; |
245 | /// * Added support for the Illumos triple. |
246 | /// |
247 | /// [`os::windows::Library::load_with_flags`]: crate::os::windows::Library::load_with_flags |
248 | pub mod r0_6_1 {} |
249 | |
250 | /// Release 0.6.0 (2020-04-05) |
251 | /// |
252 | /// * Introduced a new method [`os::unix::Library::get_singlethreaded`]; |
253 | /// * Added (untested) support for building when targeting Redox and Fuchsia; |
254 | /// * The APIs exposed by this library no longer panic and instead return an `Err` when it used |
255 | /// to panic. |
256 | /// |
257 | /// ## Breaking changes |
258 | /// |
259 | /// * Minimum required (stable) version of Rust to build this library is now 1.40.0; |
260 | /// * This crate now implements a custom [`Error`] type and all APIs now return this type rather |
261 | /// than returning the `std::io::Error`; |
262 | /// * `libloading::Result` has been removed; |
263 | /// * Removed the dependency on the C compiler to build this library on UNIX-like platforms. |
264 | /// `libloading` used to utilize a snippet written in C to work-around the unlikely possibility |
265 | /// of the target having a thread-unsafe implementation of the `dlerror` function. The effect of |
266 | /// the work-around was very opportunistic: it would not work if the function was called by |
267 | /// forgoing `libloading`. |
268 | /// |
269 | /// Starting with 0.6.0, [`Library::get`] on platforms where `dlerror` is not MT-safe (such as |
270 | /// FreeBSD, DragonflyBSD or NetBSD) will unconditionally return an error when the underlying |
271 | /// `dlsym` returns a null pointer. For the use-cases where loading null pointers is necessary |
272 | /// consider using [`os::unix::Library::get_singlethreaded`] instead. |
273 | /// |
274 | /// [`Library::get`]: crate::Library::get |
275 | /// [`os::unix::Library::get_singlethreaded`]: crate::os::unix::Library::get_singlethreaded |
276 | /// [`Error`]: crate::Error |
277 | pub mod r0_6_0 {} |
278 | |
279 | /// Release 0.5.2 (2019-07-07) |
280 | /// |
281 | /// * Added API to convert OS-specific `Library` and `Symbol` conversion to underlying resources. |
282 | pub mod r0_5_2 {} |
283 | |
284 | /// Release 0.5.1 (2019-06-01) |
285 | /// |
286 | /// * Build on Haiku targets. |
287 | pub mod r0_5_1 {} |
288 | |
289 | /// Release 0.5.0 (2018-01-11) |
290 | /// |
291 | /// * Update to `winapi = ^0.3`; |
292 | /// |
293 | /// ## Breaking changes |
294 | /// |
295 | /// * libloading now requires a C compiler to build on UNIX; |
296 | /// * This is a temporary measure until the [`linkage`] attribute is stabilised; |
297 | /// * Necessary to resolve [#32]. |
298 | /// |
299 | /// [`linkage`]: https://github.com/rust-lang/rust/issues/29603 |
300 | /// [#32]: https://github.com/nagisa/rust_libloading/issues/32 |
301 | pub mod r0_5_0 {} |
302 | |
303 | /// Release 0.4.3 (2017-12-07) |
304 | /// |
305 | /// * Bump lazy-static dependency to `^1.0`; |
306 | /// * `cargo test --release` now works when testing libloading. |
307 | pub mod r0_4_3 {} |
308 | |
309 | /// Release 0.4.2 (2017-09-24) |
310 | /// |
311 | /// * Improved error and race-condition handling on Windows; |
312 | /// * Improved documentation about thread-safety of Library; |
313 | /// * Added `Symbol::<Option<T>::lift_option() -> Option<Symbol<T>>` convenience method. |
314 | pub mod r0_4_2 {} |
315 | |
316 | /// Release 0.4.1 (2017-08-29) |
317 | /// |
318 | /// * Solaris support |
319 | pub mod r0_4_1 {} |
320 | |
321 | /// Release 0.4.0 (2017-05-01) |
322 | /// |
323 | /// * Remove build-time dependency on target_build_utils (and by extension serde/phf); |
324 | /// * Require at least version 1.14.0 of rustc to build; |
325 | /// * Actually, it is cargo which has to be more recent here. The one shipped with rustc 1.14.0 |
326 | /// is what’s being required from now on. |
327 | pub mod r0_4_0 {} |
328 | |
329 | /// Release 0.3.4 (2017-03-25) |
330 | /// |
331 | /// * Remove rogue println! |
332 | pub mod r0_3_4 {} |
333 | |
334 | /// Release 0.3.3 (2017-03-25) |
335 | /// |
336 | /// * Panics when `Library::get` is called for incompatibly sized type such as named function |
337 | /// types (which are zero-sized). |
338 | pub mod r0_3_3 {} |
339 | |
340 | /// Release 0.3.2 (2017-02-10) |
341 | /// |
342 | /// * Minimum version required is now rustc 1.12.0; |
343 | /// * Updated dependency versions (most notably target_build_utils to 0.3.0) |
344 | pub mod r0_3_2 {} |
345 | |
346 | /// Release 0.3.1 (2016-10-01) |
347 | /// |
348 | /// * `Symbol<T>` and `os::*::Symbol<T>` now implement `Send` where `T: Send`; |
349 | /// * `Symbol<T>` and `os::*::Symbol<T>` now implement `Sync` where `T: Sync`; |
350 | /// * `Library` and `os::*::Library` now implement `Sync` (they were `Send` in 0.3.0 already). |
351 | pub mod r0_3_1 {} |
352 | |
353 | /// Release 0.3.0 (2016-07-27) |
354 | /// |
355 | /// * Greatly improved documentation, especially around platform-specific behaviours; |
356 | /// * Improved test suite by building our own library to test against; |
357 | /// * All `Library`-ies now implement `Send`. |
358 | /// * Added `impl From<os::platform::Library> for Library` and `impl From<Library> for |
359 | /// os::platform::Library` allowing wrapping and extracting the platform-specific library handle; |
360 | /// * Added methods to wrap (`Symbol::from_raw`) and unwrap (`Symbol::into_raw`) the safe `Symbol` |
361 | /// wrapper into unsafe `os::platform::Symbol`. |
362 | /// |
363 | /// The last two additions focus on not restricting potential usecases of this library, allowing |
364 | /// users of the library to circumvent safety checks if need be. |
365 | /// |
366 | /// ## Breaking Changes |
367 | /// |
368 | /// `Library::new` defaults to `RTLD_NOW` instead of `RTLD_LAZY` on UNIX for more consistent |
369 | /// cross-platform behaviour. If a library loaded with `Library::new` had any linking errors, but |
370 | /// unresolved references weren’t forced to be resolved, the library would’ve “just worked”, |
371 | /// whereas now the call to `Library::new` will return an error signifying presence of such error. |
372 | /// |
373 | /// ## os::platform |
374 | /// * Added `os::unix::Library::open` which allows specifying arbitrary flags (e.g. `RTLD_LAZY`); |
375 | /// * Added `os::windows::Library::get_ordinal` which allows finding a function or variable by its |
376 | /// ordinal number; |
377 | pub mod r0_3_0 {} |
378 | |