{"id":13725043,"url":"https://github.com/ManasJayanth/esy-libffi","last_synced_at":"2025-05-07T19:32:28.108Z","repository":{"id":44639209,"uuid":"336714113","full_name":"ManasJayanth/esy-libffi","owner":"ManasJayanth","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-21T09:57:39.000Z","size":25,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T23:51:52.208Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ManasJayanth.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"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":"2021-02-07T06:04:50.000Z","updated_at":"2024-10-21T09:57:42.000Z","dependencies_parsed_at":"2024-11-14T15:36:25.764Z","dependency_job_id":"0971baa5-c726-417e-a922-10b095a10ecd","html_url":"https://github.com/ManasJayanth/esy-libffi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"esy-packages/template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManasJayanth%2Fesy-libffi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManasJayanth%2Fesy-libffi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManasJayanth%2Fesy-libffi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManasJayanth%2Fesy-libffi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ManasJayanth","download_url":"https://codeload.github.com/ManasJayanth/esy-libffi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252943863,"owners_count":21829327,"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-08-03T01:02:10.747Z","updated_at":"2025-05-07T19:32:28.096Z","avatar_url":"https://github.com/ManasJayanth.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"[![Build and test the esy package](https://github.com/ManasJayanth/esy-libffi/actions/workflows/workflow.yml/badge.svg)](https://github.com/ManasJayanth/esy-libffi/actions/workflows/workflow.yml)\n\n# esy-libffi\n\n`esy-libffi` is sample package, [`libffi`](https://github.com/esy/test-hello-c), packaged for [`esy`](https://esy.sh/).\n\n## Why\n`esy` can not only fetch and install Reason and OCaml libraries and tools,\nbut also those written in C. This extends reproducibility benefits to\npackages written in C, like `skia`, `libffi`, `pkg-config`\netc. Users don't have to install them separately, nor have to worry if\nthey have installed the correct version. Read more at the docs about\n[benefits for opting for esy packages](https://esy.sh#TODO).\n\n## How to use `esy-libffi`?\n\n`esy-libffi` can be used from both NPM and directly from Github.\n\n### From NPM \n\n`esy-libffi` is deployed on NPM can be found\n[here](https://www.npmjs.com/package/TODO).\n\nYou can simply run `esy add esy-libffi` to install it, or specify it in\n`package.json` and run `esy`.\n\n```diff\n{\n  \"dependencies\": {\n+   \"esy-libffi\": \"*\"\n  }\n}\n```\n\n### Directly from Github\n\n```json\n{\n  \"dependencies\": {\n    \"esy-libffi\": \"esy-packages/esy-libffi\"\n  }\n}\n```\n\ni.e. `\u003cGITHUB_ORG or USERNAME\u003e/\u003cREPO NAME\u003e`\n\nTo use a specific commit,\n\n```diff\n  \"dependencies\": {\n+   \"esy-libffi\": \"esy-packages/esy-libffi#\u003ccommit hash\u003e\"\n  }\n```\n\n## How to package for esy?\n\n### For the experienced\n\n**The gist**\nSpecify the configure and build commands in `esy.build` property of\n`esy.json` and the install step in `esy.install`. If the package\nbuilds \"in source\", set `esy.buildsInSource` property to `true`. Use\n`$cur__install` environment variable to set the install location.\n\nSee [docs](TODO) for reference.\n\nThe CI will take care of fetching the sources and creating an NPM\npackage for you. See [script.js](TODO) to see how it works.\n\nYou can download it or auto publish via CI.\n\n### For beginners\n\n\u003e Note: you'll need Node.js for this tutorial. If you're experienced\n\u003e with bash, you can use it instead.\n\nFundamentally, packaging for esy works like in other Linux distros,\nexcept ofcourse, such that packages become available on MacOS and\nWindows too.\n\nYou would typically have to specify the instructions to build the\npackage in the `esy.json`. For example, everyone's favourite http\ntool, [curl](https://curl.se/), needs the following instructions ([as\ndescribed on their website](https://curl.se/docs/install.html))\n\n```sh\n./configure\nmake\nmake install\n```\n\nMany packages have similar instructions!\n\nConfigure and build steps are specified in the `esy.build` property in\nthe `esy.json` and install steps in `esy.install`. Example,\n\n```json\n{\n  \"esy\": {\n    \"build\": [\n\t  \"./configure\",\n\t  \"make\"\n\t],\n\t\"install\": [\n\t  \"make install\"\n\t]\n  }\n}\n```\n\n\n## Testing and making sure the package works as expected \n\nTo test if the package works, we recommend an end-to-end test by\npublishing it to local\n[`verdaccio`](https://github.com/verdaccio/verdaccio), and using the\npackage with a `package.json` or `esy.json` depends on it.\n\n```json\n{\n  \"dependencies\": {\n    esy-libffi\": \"*\"\n  }\n}\n```\n\nAnd pointing `esy` to the local npm registry\n\n```sh\nesy i --npm-registry http://localhost:4873\nesy b\n```\n\nIf the package is a library, it's a good idea to write a small program\nto actually check if the library works. Referring how the\ncorresponding package is being tested in Homebrew or Arch Linux.\n\nCheckout [ci-test.sh](./ci-test.sh) for reference, used on the CI.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FManasJayanth%2Fesy-libffi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FManasJayanth%2Fesy-libffi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FManasJayanth%2Fesy-libffi/lists"}