Skip to content

Version 3.0.0 #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 150 commits into
base: main
Choose a base branch
from
Open

Version 3.0.0 #86

wants to merge 150 commits into from

Conversation

martin-olivier
Copy link
Owner

Description

This pull request includes all the changes for the third major version of dylib

Changes include

  • dylib is now a namespace, the main class is now dylib::library. Now, by default, no decorators are applied to the library name, you should use for example dylib::decorations::os_default()

dylib 2.0

// Windows -> "./plugins/core.dll"
// MacOS   -> "./plugins/libcore.dylib"
// Linux   -> "./plugins/libcore.so"
dylib lib("./plugins/core");

dylib 3.0

// Windows -> "./plugins/core.dll"
// MacOS   -> "./plugins/libcore.dylib"
// Linux   -> "./plugins/libcore.so"
dylib::library lib("./plugins/core", dylib::decorations::os_default());
  • Support of cross-platform and cross-compiler C++ mangled symbols gathering.
dylib::library lib("./plugins/core", dylib::decorations::os_default());
auto format = lib.get_function<std::string(const char *)>("tools::string::format(char const *)");
  • Macros DYLIB_WIN_OTHER and DYLIB_WIN_MAC_OTHER are now public
  • Support of custom decorations
// Windows -> "./plugins/core.dll"
// MacOS   -> "./plugins/libcore.so"
// Linux   -> "./plugins/libcore.so"
auto custom_decorations = dylib::decorations(
    DYLIB_WIN_OTHER("", "lib"), DYLIB_WIN_OTHER(".dll", ".so")
);
dylib::library lib("./plugins/core", custom_decorations);

Drop of support

  • System libraries cannot be gathered anymore without specifying a full path:

dylib 2.0

dylib lib("kernel32");
auto GetCurrentThreadId = lib.get_function<DWORD()>("GetCurrentThreadId");

dylib 3.0

dylib::library lib("\Windows\system32\Kernel32.dll");
auto GetCurrentThreadId = lib.get_function<DWORD()>("GetCurrentThreadId");

Signed-off-by: Martin Olivier <[email protected]>
Signed-off-by: Martin Olivier <[email protected]>
Signed-off-by: Martin Olivier <[email protected]>
Signed-off-by: Martin Olivier <[email protected]>
This reverts commit d2d2ff3.

Signed-off-by: Martin Olivier <[email protected]>
…d dylib"

This reverts commit af6588c.

Signed-off-by: Martin Olivier <[email protected]>
@martin-olivier martin-olivier self-assigned this Jun 14, 2025
@martin-olivier martin-olivier added the enhancement New feature or request label Jun 14, 2025
This reverts commit 86d56ad.

The kernel32.dll file is not present in the regular path
'/windows/system32/kernel32.dll' when using github actions.

Signed-off-by: Martin Olivier <[email protected]>
@eyalroz
Copy link
Contributor

eyalroz commented Jun 14, 2025

I'll start by saying that it's quite difficult to review a huge PR like this, with dozens of changes. I hope I can get to it soon, but I'm not making any promises. I just got up from the bomb shelter - we are getting Iranian missiles now. Damn ridiculous war on Iran.

@martin-olivier
Copy link
Owner Author

Sorry to hear that, I hope you and your family are safe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants