Skip to content

Add helpers for dynamic libraries to the DynamicLoading package - #29101

Open
dlongnecke-cray wants to merge 2 commits into
chapel-lang:mainfrom
dlongnecke-cray:dynamic-loading-53
Open

Add helpers for dynamic libraries to the DynamicLoading package#29101
dlongnecke-cray wants to merge 2 commits into
chapel-lang:mainfrom
dlongnecke-cray:dynamic-loading-53

Conversation

@dlongnecke-cray

@dlongnecke-cray dlongnecke-cray commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

This PR adds some helper routines to the DynamicLoading package module that make it more convenient to load dynamic libraries.

  • proc type libName(basename: string, directory: string="");
  • proc type loadLib(basename: string, directory: string="") throws;
  • proc type libSuffix param;

The libName procedure returns libfoo.so when given an input of foo.

The loadLib procedure tries to load a dynamic library libfoo.so when given the input foo.

The libSuffix procedure returns either so or dylib depending on the platform.

Signed-off-by: David Longnecker <dlongnecke-cray@users.noreply.github.com>
@dlongnecke-cray dlongnecke-cray self-assigned this Jul 8, 2026
Signed-off-by: David Longnecker <dlongnecke-cray@users.noreply.github.com>
@dlongnecke-cray dlongnecke-cray changed the title Add a dynamicLibraryFileExtension procedure to DynamicLoading package Add helpers for dynamic libraries to the DynamicLoading package Jul 13, 2026
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.

1 participant