{"id":16733265,"url":"https://github.com/msakai/haskell-foreign-library-example","last_synced_at":"2025-07-08T12:43:39.076Z","repository":{"id":50375680,"uuid":"518900308","full_name":"msakai/haskell-foreign-library-example","owner":"msakai","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-29T11:49:37.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T20:14:53.860Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msakai.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-28T15:29:43.000Z","updated_at":"2022-07-28T15:30:08.000Z","dependencies_parsed_at":"2022-08-05T13:18:41.200Z","dependency_job_id":null,"html_url":"https://github.com/msakai/haskell-foreign-library-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/msakai/haskell-foreign-library-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msakai%2Fhaskell-foreign-library-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msakai%2Fhaskell-foreign-library-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msakai%2Fhaskell-foreign-library-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msakai%2Fhaskell-foreign-library-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msakai","download_url":"https://codeload.github.com/msakai/haskell-foreign-library-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msakai%2Fhaskell-foreign-library-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264271826,"owners_count":23582763,"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":[],"created_at":"2024-10-12T23:49:15.870Z","updated_at":"2025-07-08T12:43:39.019Z","avatar_url":"https://github.com/msakai.png","language":"C","readme":"# haskell-foreign-library-example\n\nThis is a repository for experimenting with `foreign-library` feature of GHC.\n\n## Usage with `stack`\n\n```\n$ stack build\n$ stack exec -- gcc test.c -Ilib -L$(stack path --local-install-root)/lib -lexample -o test\n```\n\nmacOS:\n```\n$ install_name_tool -add_rpath $(stack path --local-install-root)/lib test\n$ ./test\n```\n\nLinux:\n```\n$ export LD_LIBRARY_PATH=$(stack path --local-install-root)/lib:$LD_LIBRARY_PATH\n$ ./test\n```\n\nWindows (MINGW):\n```\n$ export PATH=$(cygpath -u $(stack path --local-install-root))/lib:$PATH\n$ ./test\n```\n\n## Usage with `cabal-install`\n\n```\n$ cabal build\n$ cabal exec -- gcc test.c -Ilib -L$(dirname $(cabal list-bin example)) -lexample -o test\n```\n\nmacOS:\n```\n$ install_name_tool -add_rpath $(dirname $(cabal list-bin example)) test\n$ ./test\n```\n\nLinux:\n```\n$ export LD_LIBRARY_PATH=$(dirname $(cabal list-bin example)):$LD_LIBRARY_PATH\n$ ./test\n```\n\nWindows (MINGW):\n```\n$ export PATH=$(cygpath -u $(dirname $(cabal list-bin example))):$PATH\n$ ./test\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsakai%2Fhaskell-foreign-library-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsakai%2Fhaskell-foreign-library-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsakai%2Fhaskell-foreign-library-example/lists"}