{"id":17861109,"url":"https://github.com/jonathanstowe/librarycheck","last_synced_at":"2026-02-04T01:04:47.170Z","repository":{"id":33552744,"uuid":"37198941","full_name":"jonathanstowe/LibraryCheck","owner":"jonathanstowe","description":"Quick hack for Raku to check if a shared library is loadable","archived":false,"fork":false,"pushed_at":"2023-07-11T10:55:23.000Z","size":28,"stargazers_count":3,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-30T20:11:40.205Z","etag":null,"topics":["devel","nativecall","raku"],"latest_commit_sha":null,"homepage":"","language":"Raku","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonathanstowe.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-10T13:31:37.000Z","updated_at":"2022-08-07T08:48:12.000Z","dependencies_parsed_at":"2024-10-28T09:05:43.062Z","dependency_job_id":"58d314f8-21db-4f8c-9b34-627e4d5aaa0d","html_url":"https://github.com/jonathanstowe/LibraryCheck","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/jonathanstowe/LibraryCheck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FLibraryCheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FLibraryCheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FLibraryCheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FLibraryCheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanstowe","download_url":"https://codeload.github.com/jonathanstowe/LibraryCheck/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FLibraryCheck/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263091026,"owners_count":23412343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devel","nativecall","raku"],"created_at":"2024-10-28T08:42:55.898Z","updated_at":"2026-02-04T01:04:47.141Z","avatar_url":"https://github.com/jonathanstowe.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LibraryCheck\n\nDetermine whether a shared library is available to be loaded by Raku\n\n![Build Status](https://github.com/jonathanstowe/LibraryCheck/workflows/CI/badge.svg)\n\n## Synopsis\n\n```raku\nuse LibraryCheck;\n\nif !library-exists('sndfile', v1) {\n    die \"Cannot load libsndfile\";\n}\n```\n\n## Description\n\nThis module provides a mechanism that will determine whether a named\nshared library is available and can be used by NativeCall.\n\nIt exports a single function `library-exists` that returns a boolean to\nindicate whether the named shared library can be loaded and used. The\nlibrary name should be supplied without any (OS-dependent) \"lib\" prefix\nand no extension (for example, `'crypt'` for `libcrypt.so`).\n\nThis can be used in a builder to determine whether a module has a chance\nof working (and possibly aborting the build), or in tests to cause the\ntests that may rely on a missing library to be skipped.\n\nThe second positional argument is a [Version](Version) object that\nindicates the version of the library that is required, it defaults to\n`v1`, if you don't care which version exists then it possible to pass a\nnew Version object without any version parts (i.e., `Version.new()`).\nMany systems require that the version is specified, so if portability is\na concern, an actual version number should be given.\n\nIf the `:exception` adverb is passed to `library-exists` then an\nexception (`X::NoLibrary`) will be thrown if the library isn't available\nrather than returning `False`. So the case above can be more simply\nwritten as:\n\n```raku\nlibrary-check('sndfile', v1, :exception);\n```\n\nThe implementation is somewhat of a hack currently and definitely\nshouldn't be taken as an example of nice Raku code.\n\n## Installation\n\nAssuming you have a working Rakudo installation you should be able to\ninstall this with *zef*:\n\n    # From the source directory\n\n    zef install .\n\n    # Remote installation\n\n    zef install LibraryCheck\n\nOther install mechanisms may be become available in the future.\n\n## Support\n\nSuggestions/patches are welcomed via github at https://github.com/jonathanstowe/LibraryCheck/issues\n\nI'd be particularly interested in having it work properly on all the platforms that rakudo will work on.\n\n## Licence\n\nPlease see the [LICENCE](LICENCE) file in the distribution.\n\n© Jonathan Stowe 2015 - 2021\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanstowe%2Flibrarycheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanstowe%2Flibrarycheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanstowe%2Flibrarycheck/lists"}