{"id":28895969,"url":"https://github.com/coldgrub1384/multibuild","last_synced_at":"2026-05-20T05:35:26.152Z","repository":{"id":297583430,"uuid":"997190690","full_name":"ColdGrub1384/multibuild","owner":"ColdGrub1384","description":"Swift utilities for cross compiling and packaging libraries","archived":false,"fork":false,"pushed_at":"2025-06-13T15:03:20.000Z","size":144,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-13T15:46:41.818Z","etag":null,"topics":["cmake","cross-compilation","make","python","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/ColdGrub1384.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}},"created_at":"2025-06-06T05:34:09.000Z","updated_at":"2025-06-13T14:43:39.000Z","dependencies_parsed_at":"2025-06-06T08:46:13.525Z","dependency_job_id":null,"html_url":"https://github.com/ColdGrub1384/multibuild","commit_stats":null,"previous_names":["coldgrub1384/multibuild"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ColdGrub1384/multibuild","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColdGrub1384%2Fmultibuild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColdGrub1384%2Fmultibuild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColdGrub1384%2Fmultibuild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColdGrub1384%2Fmultibuild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ColdGrub1384","download_url":"https://codeload.github.com/ColdGrub1384/multibuild/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColdGrub1384%2Fmultibuild/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261066576,"owners_count":23104775,"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":["cmake","cross-compilation","make","python","swift"],"created_at":"2025-06-21T05:10:15.965Z","updated_at":"2026-05-20T05:35:26.144Z","avatar_url":"https://github.com/ColdGrub1384.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# multibuild\n\nA Swift build system for projects compiling to multiple architectures and sdks.\nThis library provides types that define projects, configurations and also a command line interface to trigger builds.\n\nAfter compiling `multibuild` generates Python Wheels, Xcode frameworks and Swift Packages to be used on Apple platforms (non Apple platforms don't support `binaryTarget` and `xcframework`s, so we'll have to use an alternate package manager).\n\n(only supports Apple platforms for the moment and not all because that's what I'm testing against currently but I plan to add support for at least Linux / Android)\n\nSee the [documentation](https://gatit.es/emma/cosas/documentaciones/multibuild) for API usage information.\n\n## Why did I do that?\n\nI didn't know there was already a [`multibuild`](https://github.com/multi-build/multibuild) when I started this and it is also related to Python. So I may end up renaming it some time.\n\nThis is part of my effort to automatize dependency management for my app [Pyto](https://pyto.app) (a Python IDE) while making it multi platform. Precompiled binaries can be found in [this package registry](https://git.gatit.es/pyto/pyto-runtime/packages). I have been spending more than half a year in this task while not working almost anything in the app itself but I added `Mac Catalyst` support and will be supporting other platforms. The idea is to have the same coding environment accross platforms so I'm starting with all Apple platforms. `visionOS` and `macOS` (native) are not yet supported because I'll start by having the app on `Mac Catalyst`, `watchOS` and `tvOS`.\n\n## Installation\n\nTo use this library, create an executable Swift Package target and add `multibuild` as a dependency.\n\n```swift\nlet package = Package(\n    name: \"build-libraries\",\n    dependencies: [\n        .package(url: \"pi@git.gatit.es:emma/multibuild.git\", from: \"2.0.0\")\n    ],\n    targets: [\n        .executableTarget(\n            name: \"build-libraries\",\n            dependencies: [\n                .product(name: \"Multibuild\", package: \"multibuild\")\n            ]),\n    ]\n)\n```\n\n## Usage\n\n`multibuild` provides types for for constructing projects that work with Autoconf, CMake and other build systems.\nThe protocol `BuildPlan` provides an entry point for a command line program.\n\n```swift\nimport Multibuild\n\n@main\nstruct Plan: BuildPlan {\n    var platform: Platform = .apple // .iOS + .macCatalyst + ...\n    var bundleIdentifierPrefix = \"com.myapp\"\n\n    var project: Project {\n        Project(\n            directoryURL: rootURL.appendingPathComponent(\"openssl\"),\n            version: .git(\"openssl-3.0.16\"),\n            builder: Autoconf(products: [\n                .dynamicLibrary(staticArchives: [\n                    \"libssl.a\", \"libcrypto.a\"\n                ], includePath: \"include\")\n            ], configureArguments: { _ in\n                [\"-static\", ] // ...\n            }, additionalCompilerFlags: { _ in\n                [\"-DHAVE_FORK=0\"]\n            }))\n         // ...\n    }\n}\n```\n\nOn Apple platforms, this will create a framework called `openssl` (project name) from static archives `libssl.a` and `libcrypto.a`, an universal Xcode framework and a Swift Package archive (contains all the frameworks from a project).\n\n## Directory structure\n\nBuild products will be located under a `build` directory inside the compiled project.\nInside the build directory, each folder is named `sdkname.arch1`. For example, `iphoneos.arm64`. These name correspond to targets you can pass to the cli program.\nXcode frameworks are also created under an `apple.universal` directory.\n\n## CLI usage\n\n```\nOVERVIEW: Command line interface for building your projects.\n\nUSAGE: build-command [--root \u003croot\u003e] [--list-targets] [--list-projects] [--no-compile] [--no-upload] [--no-package] [--force-configure] [--target \u003ctarget\u003e ...] [--project \u003cproject\u003e ...]\n\nOPTIONS:\n  --root \u003croot\u003e           Common root directory of projects. (defaults to working directory)\n  --list-targets          List supported compilation targets and exit.\n  --list-projects         List declared projects and exit.\n  --no-compile            Skip recompilation and only perform packaging operations.\n  --no-upload             Skip uploading generated packages.\n  --no-package            Skip generation of Xcode Frameworks and Swift Packages.\n  -f, --force-configure   Force regenerating Makefiles and other configurations.\n  -t, --target \u003ctarget\u003e   Specify a target to build\n  -p, --project \u003cproject\u003e Specify a project to build\n  -h, --help              Show help information.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoldgrub1384%2Fmultibuild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoldgrub1384%2Fmultibuild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoldgrub1384%2Fmultibuild/lists"}