Skip to content
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

feat(ext/ffi): support marking symbols as optional #18529

Merged
merged 2 commits into from
Apr 3, 2023

Conversation

DjDeveloperr
Copy link
Contributor

@DjDeveloperr DjDeveloperr commented Mar 31, 2023

Adds support for marking Foreign Library symbols as optional, which does not prevent the library from loading in case an optional symbol is not found.

For example, when loading Vulkan library, certain symbols related to extensions are not present on all machines, so we mark them as optional and allow the library to still load. It's also helpful in case certain symbols are OS-specific. Some system libraries like win32 (user32, etc) may have symbols that are only present on newer version of Windows, so it can also allow compatibility with older versions.

Copy link
Collaborator

@aapoalas aapoalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This is an obvious and great feature!

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please merge it after 1.32.2 is released

Copy link
Collaborator

@aapoalas aapoalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aapoalas aapoalas merged commit 62c5664 into denoland:main Apr 3, 2023
@DjDeveloperr DjDeveloperr deleted the feat-ffi-optional-symbols branch April 4, 2023 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants