Commit Graph

140 Commits

Author SHA1 Message Date
Simonas Kazlauskas 4569e35836 Placate clippy 2022-11-07 01:12:56 +02:00
Simonas Kazlauskas 842d3b418f Release 0.7.4 2022-11-07 00:34:04 +02:00
Qiu Chaofan d5e85c73ab Support AIX dyld constants 2022-08-30 15:16:47 +08:00
cuishuang 6511538e52 fix typo
Signed-off-by: cuishuang <imcusg@gmail.com>
2022-04-24 23:09:52 +08:00
Simonas Kazlauskas 5411a8b94d Replace docsrs cfg with libloading_docs
`docsrs` is a commonly used `cfg` identifier. `libloading`'s
implementation is written in such a way that it cannot compile with this
cfg set, but is still able to produce documentation. This is done so
that the documentation is naturally covering all platform-specific
details in a single page, without users having to e.g. switch between
Windows® and Linux when reading the documentation on `docs.rs`.

The downstream crates may accidentally set this `cfg` for `rustc`
invocations as well, which can then cause them to fail to build, for no
good reason!

Using a cfg specific to a crate (e.g. `libloading_docs`)
more accurately reflects the purpose of this cfg and avoids these
problems altogether.

Fixes #101
2022-01-15 01:28:41 +02:00
Simonas Kazlauskas aed0110b8c Fix documentation building on Windows 2021-11-15 22:36:40 +02:00
Simonas Kazlauskas 282000ef46 Fix broken rustdoc links 2021-11-15 21:45:05 +02:00
Simonas Kazlauskas 7c5a6a0eda Changelog for 0.7.2 2021-11-15 21:44:43 +02:00
Simonas Kazlauskas 3ff0188486 Library & Symbol exist on supported platforms only
This makes the error messages and use of this library on targets such as
wasm32-unknown-unknown much more straightforward.
2021-11-15 21:44:39 +02:00
Mario 16310c5f08 Small typo 2021-10-17 20:52:31 +02:00
Simonas Kazlauskas 7c6a6682c1 Bump 0.7.1 2021-10-09 13:59:23 +03:00
William Henderson c483d866ec Removed unclear sentence 2021-10-09 11:50:04 +01:00
William Henderson 0e62077bd2 Added a few commas in the documentation 2021-10-09 11:32:26 +01:00
William Henderson 41a81fafef Made documentation spelling consistent
It was previously a mix of British and American English, it is now just British English
2021-10-08 20:56:51 +01:00
William Henderson 22b0e8cb6c Improved documentation of platform-specific APIs
Fixed a few minor grammatical errors and made it more idiomatic
2021-10-08 20:55:02 +01:00
William Henderson 6bc6106bc6 Improved the README and lib.rs documentation
It has been made more idiomatic and some minor grammatical errors have been amended
2021-10-08 20:37:58 +01:00
Simonas Kazlauskas b458fcb2a5 Adjust the date of the release in changelog 2021-02-06 20:27:05 +02:00
Simonas Kazlauskas 1774322f1d Review documentation 2021-02-06 20:04:21 +02:00
Simonas Kazlauskas 4182c7e7e8 Drop the code for supporting XP/Vista 2021-02-06 18:59:45 +02:00
Simonas Kazlauskas 2dc3cb5983 Bump version to 0.7 and add changelog 2021-01-31 21:32:14 +02:00
Simonas Kazlauskas ebf363ea72 Make various library loading functions unsafe 2021-01-31 21:32:14 +02:00
Simonas Kazlauskas 5afb886574 Use RTLD_LOCAL | RTLD_LAZY as default dlopen flags 2021-01-31 19:06:10 +02:00
Simonas Kazlauskas 050f41df81 Rename Error::LoadLibraryW → LoadLibraryExW 2021-01-31 19:04:57 +02:00
Simonas Kazlauskas 29ce1077e2 Add a missing link in changelog 2021-01-14 16:14:54 +02:00
Simonas Kazlauskas f5b79b966a Bump to 0.6.7 2021-01-14 16:10:24 +02:00
Ivan Molodetskikh ff4ebe7615 Add os::windows::Library::open_already_loaded() 2020-12-30 19:45:39 +03:00
Ivan Molodetskikh 4bfc6b53d7 Fix error comment 2020-12-30 19:01:50 +03:00
Simonas Kazlauskas ad352b2ae2 Bump v0.6.6 2020-12-03 15:20:46 +02:00
Simonas Kazlauskas 86b5095f75 Don't neglect to forget self in close
Otherwise it leads to a double-free, once in `close` and another time in
`drop`. Curiously this was only a bug on Windows, and Unix code was
fine. Not sure how this happened.
2020-12-03 15:05:35 +02:00
Simonas Kazlauskas 2b67ea3fe9 Bump to 0.6.5 2020-10-23 17:12:03 +03:00
Simonas Kazlauskas f11349a85c Bump to 0.6.4 2020-10-10 18:51:06 +03:00
Simonas Kazlauskas e0b5392aea Remove superfluous use of build.rs
This should make building of this crate significantly faster.

At the same time we also correctly annotate the linkage on the `extern`
block, the way it ought to be.

Sadly there's a regression in tests – the helper scripts no longer
specify the target for which tests are being built. This shall be
addressed in a subsequent commit.
2020-10-10 17:44:39 +03:00
Simonas Kazlauskas f1053ec0c0 Care around cfg to not show wrong values in docs 2020-08-24 04:40:03 +03:00
Simonas Kazlauskas 7e5f290148 Make resolve_name a stand-alone function. 2020-08-23 18:45:41 +00:00
Sven Lechner 75527deec8 feat: add name resolving library open function
The newly added method does resolve the library name passed to it by
adhering to platform-specific naming schemes using Rust provided
constants.

Closes #62
2020-08-23 18:45:41 +00:00
Simonas Kazlauskas 23c25400da Export constants for flags to be used with calls
This should make use of the target-specific `Library::open` calls
significantly more palatable.
2020-08-22 23:36:37 +00:00
Simonas Kazlauskas bc1642a4c2 Update changelog 2020-08-22 19:53:18 +00:00
Simonas Kazlauskas f75a0d0606 Do not encourage use of libloading for TLS
On MSVC Windows loading a TLS symbol will give an address to the
initializer (which when overwritten simply changes the default value new
threads gain for the variable).

On macOS thread locals are misimplemented entirely.

On Linux things "just work", but unknown to what extent, really.

Since the behaviour of using thread local variables as if they were
plain global variables is mostly undefined, lets just not make any
claims of this working.
2020-08-22 19:53:18 +00:00
Simonas Kazlauskas bbc5028a88 Improve tests
* Don’t forget to CI the thread-local support;
* Clean up some tests;
* Properly pass thorugh the target to use for the test helper.
2020-08-22 19:53:18 +00:00
Simonas Kazlauskas 5b26e8e1af Generate documentation and run clippy in CI 2020-08-22 19:53:18 +00:00
Simonas Kazlauskas 08cfc8f9c0 Significantly improve documentation
With these improvements browsing the documentation for os-specific
functionality should be possible from any system. In particular UNIX
documentation now has information on Windows and the Windows
documentation has information on UNIX-specific stuff.
2020-08-22 19:53:18 +00:00
Simonas Kazlauskas 76e2d46e9e Add os::windows::Library::this 2020-08-22 19:53:18 +00:00
Simonas Kazlauskas ecd94b27a7 Bump version to 0.6.2 2020-05-06 04:46:17 +03:00
Simonas Kazlauskas bc16d3f4d6 Release v0.6.1 2020-04-15 19:25:20 +03:00
NightRa 55d238c8c1 Avoid changing the error variant name for now - Should be done in the next breaking change 2020-04-15 19:05:09 +03:00
NightRa c884c279ff Change the comment as well into LoadLibraryExW 2020-04-15 19:00:30 +03:00
NightRa 9efaa95347 [Windows]: LoadLibraryExW - document the reserved parameter 2020-04-15 18:09:54 +03:00
NightRa c09beab773 [Windows]: Allow LoadLibraryExW 2020-04-15 18:01:16 +03:00
Simonas Kazlauskas 6efe62d88c Fill in the date in the changelog 2020-04-05 22:49:00 +03:00
Simonas Kazlauskas 62da429eb2 Fix deprecated mem::uninitialized. 2020-04-05 22:25:39 +03:00