{"id":13448473,"url":"https://github.com/prebuild/prebuildify-cross","last_synced_at":"2025-05-07T16:05:41.651Z","repository":{"id":43376034,"uuid":"160345402","full_name":"prebuild/prebuildify-cross","owner":"prebuild","description":"Compile prebuilds in Docker.","archived":false,"fork":false,"pushed_at":"2024-10-17T16:49:02.000Z","size":52,"stargazers_count":17,"open_issues_count":4,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-02T23:34:53.563Z","etag":null,"topics":["cross-compile","dockcross","native-addons","nodejs","prebuildify","prebuilds","prebuilt-binaries"],"latest_commit_sha":null,"homepage":"","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/prebuild.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":"2018-12-04T11:14:44.000Z","updated_at":"2024-10-17T16:49:06.000Z","dependencies_parsed_at":"2024-02-02T15:29:06.564Z","dependency_job_id":"5ef97d37-ea3c-4d11-a525-6b86e77b7037","html_url":"https://github.com/prebuild/prebuildify-cross","commit_stats":{"total_commits":45,"total_committers":4,"mean_commits":11.25,"dds":0.4444444444444444,"last_synced_commit":"7c0b07e22110d4cfec147810074ecdfa22638066"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prebuild%2Fprebuildify-cross","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prebuild%2Fprebuildify-cross/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prebuild%2Fprebuildify-cross/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prebuild%2Fprebuildify-cross/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prebuild","download_url":"https://codeload.github.com/prebuild/prebuildify-cross/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233352199,"owners_count":18663252,"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":["cross-compile","dockcross","native-addons","nodejs","prebuildify","prebuilds","prebuilt-binaries"],"created_at":"2024-07-31T05:01:46.607Z","updated_at":"2025-01-10T13:33:51.894Z","avatar_url":"https://github.com/prebuild.png","language":"JavaScript","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# prebuildify-cross\n\n**Compile prebuilds in Docker, supporting Linux (including Debian 8, Ubuntu 14.04, RHEL 7, CentOS 7 and up), Alpine Linux, ARM Linux devices like the Raspberry Pi and mobile ARM devices like Android.**\n\nRuns [`prebuildify`](https://github.com/mafintosh/prebuildify) in preconfigured [`prebuild/docker-images`](https://github.com/prebuild/docker-images) containers to compile and name prebuilds for a certain platform. This means you don't have to worry about GCC flags, environment variables or system dependencies. In addition, `prebuildify-cross` copies only npm package files to Docker (following the rules of `.npmignore` and `files`) and mounts `node_modules` removing the need for a repeated `npm install`.\n\n## Install\n\nDepends on having Docker installed, as well as `prebuildify` and `node-gyp`:\n\n```\nnpm install --save-dev prebuildify node-gyp prebuildify-cross\n```\n\n## Usage\n\nThe `prebuildify-cross` cli forwards all command line arguments to `prebuildify`, but adds an `--image` or `-i` argument. For example, the following command will invoke `prebuildify -t 8.14.0 --napi --strip` in a CentOS container and copy the resulting prebuild to `./prebuilds`:\n\n```\nprebuildify-cross -i centos7-devtoolset7 -t 8.14.0 --napi --strip\n```\n\nTo build for more than one platform, multiple `--image` arguments may be passed:\n\n```\nprebuildify-cross -i linux-armv7 -i linux-arm64 -t ..\n```\n\nBy default [`prebuild/docker-images`](https://github.com/prebuild/docker-images) are used which are publicly hosted on the [GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry) (`ghcr.io`). It's possible to use custom images with e.g. `-i my-namespace/my-image`. Image arguments that don't contain a forward slash are expanded to `ghcr.io/prebuild/\u003cimage\u003e` and if these don't contain a tag they're further expanded to `ghcr.io/prebuild/\u003cimage\u003e:\u003cversion\u003e` where `version` is currently 2.\n\nTo use `latest` images (not recommended) an image tag must be specified explicitly. For example:\n\n```\nprebuildify-cross -i linux-armv7:latest -t ..\n```\n\nWhen working in a monorepo, where `./node_modules` does not contain the dependencies that `prebuildify-cross` relies upon, a custom path can be provided with `--modules`. It can be an absolute path or relative to the current working directory. For example:\n\n```sh\nprebuildify-cross --modules ../../node_modules -i linux-armv7:latest -t 20.0.0 --strip\n```\n\n## Images\n\n- [`centos7-devtoolset7`](https://github.com/prebuild/docker-images#centos7-devtoolset7)\n- [`alpine`](https://github.com/prebuild/docker-images#alpine)\n- [`linux-armv6`](https://github.com/prebuild/docker-images#linux-armv6)\n- [`linux-armv7`](https://github.com/prebuild/docker-images#linux-armv7)\n- [`linux-arm64`](https://github.com/prebuild/docker-images#linux-arm64)\n- [`android-armv7`](https://github.com/prebuild/docker-images#android-armv7)\n- [`android-arm64`](https://github.com/prebuild/docker-images#android-arm64)\n\n## References\n\n- [Debian multiarch tuples](https://wiki.debian.org/Multiarch/Tuples)\n- [Rust support tuples](https://forge.rust-lang.org/platform-support.html)\n- [GCC flags](https://stackoverflow.com/questions/16044020/gcc-and-linking-environment-variables-and-flags)\n- [Arm options](https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html)\n- [Rust cross-compiling tutorial](https://github.com/japaric/rust-cross)\n- [Rust cross-compilation tool](https://github.com/rust-embedded/cross)\n\n## License\n\nGPL-3.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprebuild%2Fprebuildify-cross","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprebuild%2Fprebuildify-cross","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprebuild%2Fprebuildify-cross/lists"}