{"id":31287924,"url":"https://github.com/ffilibs/poc","last_synced_at":"2026-05-01T21:34:06.333Z","repository":{"id":314895757,"uuid":"1057200897","full_name":"ffilibs/poc","owner":"ffilibs","description":"Pre-compiled static builds of popular open source libraries for Node.js and Bun","archived":false,"fork":false,"pushed_at":"2025-09-15T12:23:51.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-24T11:50:33.836Z","etag":null,"topics":["bun","ffi","hacktoberfest","hacktoberfest2025","nodejs"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ffilibs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-15T12:09:03.000Z","updated_at":"2025-09-15T12:23:55.000Z","dependencies_parsed_at":"2025-09-15T14:32:25.091Z","dependency_job_id":"d77a6438-4b32-49f2-9e59-eb4dc4f83166","html_url":"https://github.com/ffilibs/poc","commit_stats":null,"previous_names":["ffilibs/poc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ffilibs/poc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffilibs%2Fpoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffilibs%2Fpoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffilibs%2Fpoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffilibs%2Fpoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ffilibs","download_url":"https://codeload.github.com/ffilibs/poc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffilibs%2Fpoc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32513755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bun","ffi","hacktoberfest","hacktoberfest2025","nodejs"],"created_at":"2025-09-24T11:35:12.044Z","updated_at":"2026-05-01T21:34:06.323Z","avatar_url":"https://github.com/ffilibs.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ffilibs\n\n[![License](https://img.shields.io/github/license/ffilibs/poc)](LICENSE)\n\n\u003e Pre-compiled static builds of popular open source libraries for Node.js and Bun\n\n## 🎯 Project Goal\n\n**ffilibs** provides pre-compiled static versions of popular open source libraries, packaged for easy distribution via npm. This eliminates the need to compile native dependencies from source, making it faster and easier to use powerful libraries like `libgit2`, `libssh2`, and others in your JavaScript/TypeScript projects.\n\n### Why ffilibs?\n\n- ⚡ **Fast Installation**: No more waiting for native compilation\n- 🔧 **Zero Dependencies**: Static builds with no external library requirements  \n- 🌍 **Cross-Platform**: Support for macOS, Windows, and Linux on both x64 and ARM architectures\n- 📦 **npm Ready**: Simple `npm install` - no build tools required\n- 🦀 **Bun Optimized**: Works seamlessly with Bun's FFI capabilities\n\n## 🚀 Quick Start\n\n### Installation\n\n```bash\nnpm install @ffilibs/libgit2\n```\n\n### Usage with Bun\n\nBun makes it incredibly easy to call into these native libraries:\n\n```javascript\nimport { dlopen, ptr, CString } from 'bun:ffi';\nimport path from 'path';\n\n// Load the library\nconst lib = dlopen(path.join(process.cwd(), 'node_modules/@ffilibs/libgit2/prebuilds/linux/arm/lib/libgit2.a'), {\n  git_libgit2_init: {\n    args: [],\n    returns: 'int',\n  },\n  git_libgit2_shutdown: {\n    args: [],\n    returns: 'int',\n  },\n  // Add more functions as needed\n});\n\n// Initialize libgit2\nlib.symbols.git_libgit2_init();\n\n// Your code here...\n\n// Cleanup\nlib.symbols.git_libgit2_shutdown();\n```\n\n## 📚 Available Libraries\n\n| Library | Version | Description | Package |\n|---------|---------|-------------|---------|\n| **libgit2** | 1.9.1 | Git implementation library | `@ffilibs/libgit2` |\n| **libssh2** | 1.9.0 | SSH2 lib | `@ffilibs/libssh2` |\n| **tree-sitter.dev** | 0.22.6 | Incremental parsing library \u0026 CLI | `@ffilibs/tree-sitter.dev` |\n| **yogalayout.dev** | 3.2.1 | Cross-platform layout engine | `@ffilibs/yogalayout.dev` |\n| **zlib**            | 1.3.1 | zlib | `@ffilibs/zlib` |\n\n## 🏗️ Supported Platforms\n\n| Platform | x64 | ARM64 |\n|----------|-----|-------|\n| **macOS** | ✅ | ✅ |\n| **Linux** | ✅ | ✅ |\n| **Windows** | ✅ | ❌ |\n\n## 🛠️ Build Process\n\nEach library is built with optimized settings:\n\n- **Static linking**: No external dependencies\n- **Release mode**: Optimized for performance  \n- **Cross-platform**: Built on GitHub Actions for all supported platforms\n- **Consistent configuration**: SSH support enabled where applicable\n\n### Local Building\n\nTo build a library locally:\n\n```bash\ncd packages/libgit2\n./build.sh\n```\n\nThe build script will:\n1. Download the source code\n2. Configure with appropriate flags\n3. Compile with all CPU cores\n4. Package into `release.tar.gz`\n\n## 🤝 Background\n\nThis project is inspired by [a tweet from @thdxr](https://x.com/thdxr/status/1962686350357942315):\n\n\u003e \"there needs to be a project that provides static builds of common libraries (libgit2, treesitter, yoga, etc) for x64 + ARM + mac/windows/linux and publishes them to npm\n\u003e \n\u003e bun makes it stupid easy to call into these, it's just the packaging that is annoying\"\n\n## 🔄 Contributing\n\nWe welcome contributions! Here's how you can help:\n\n- 🐛 **Report Issues**: Found a bug? [Create an issue](https://github.com/ffilibs/poc/issues)\n- 📦 **Request Libraries**: Need another library? Open a feature request\n- 🔧 **Improve Builds**: Help optimize build scripts and configurations  \n- 📖 **Documentation**: Help improve docs and examples\n- 🎃 **Hacktoberfest**: This project participates in Hacktoberfest!\n\n### Adding a New Library\n\n1. Create a new directory in `packages/`\n2. Add `build.sh` and `build.ps1` scripts\n3. Configure static build with appropriate flags\n4. Test on all supported platforms\n5. Submit a pull request\n\n### Contact\n\n- **GitHub**: [Create an issue](https://github.com/ffilibs/poc/issues) or pull request\n- **X/Twitter**: [@bascodes](https://x.com/bascodes)\n\n## 📄 License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003eBuilt with ❤️ for the JavaScript and Bun community\u003c/sub\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fffilibs%2Fpoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fffilibs%2Fpoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fffilibs%2Fpoc/lists"}