{"id":17968160,"url":"https://github.com/compnerd/uswift","last_synced_at":"2025-04-12T23:42:26.723Z","repository":{"id":42079142,"uuid":"161972108","full_name":"compnerd/uswift","owner":"compnerd","description":"μSwift[Core]","archived":false,"fork":false,"pushed_at":"2024-07-22T15:08:20.000Z","size":80,"stargazers_count":104,"open_issues_count":3,"forks_count":9,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-12T23:42:22.455Z","etag":null,"topics":["swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/compnerd.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}},"created_at":"2018-12-16T05:50:32.000Z","updated_at":"2025-01-23T00:56:08.000Z","dependencies_parsed_at":"2024-07-25T23:33:15.885Z","dependency_job_id":null,"html_url":"https://github.com/compnerd/uswift","commit_stats":{"total_commits":96,"total_committers":4,"mean_commits":24.0,"dds":"0.44791666666666663","last_synced_commit":"be13a7dc9ffc080581991ccd9d2a84209e9fb6bc"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compnerd%2Fuswift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compnerd%2Fuswift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compnerd%2Fuswift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compnerd%2Fuswift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compnerd","download_url":"https://codeload.github.com/compnerd/uswift/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647257,"owners_count":21139081,"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":["swift"],"created_at":"2024-10-29T14:20:23.263Z","updated_at":"2025-04-12T23:42:26.700Z","avatar_url":"https://github.com/compnerd.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"μSwift[Core]\n------------\n\nThe Swift language is implemented as a small layer of sugar over LLVM IR.  This\nincludes the core types such as `Bool`.  In order to support even basic\nconstructs, the language requires the standard library to be available.  The\nreference standard library is a large code base and has additional dependencies\nsuch as [libicu](https://icu-project.org).  This makes the library inconvenient\nfor certain environments.\n\nμSwift is a minimal standard library that provides a few of the core interfaces\nrequired for using basic constructs in Swift.  The long term vision for this\nlibrary is to provide conditional control over the features that the\nimplementation vends.  This enables the use of Swift in embedded systems which\nmay not be amenable to large libraries and do not need the complete core\nfunctionality from Swift (e.g. Unicode support).\n\n## Components\n\n1. `swiftCore`: the standard library.\n2. `swiftOnoneSupport`: the support library for building with `-Onone`\n3. `swiftRuntime`: the language runtime support (merged into `swiftCore`)\n\n## Build Requirements\n- clang compiler (11.0+)\n- Swift compiler (5.4+)\n- CMake (3.18+)\n- Ninja (1.8+)\n\n## Building\n\nBuilding a dynamically linked version of the libraries is controlled by the\n`BUILD_SHARED_LIBS` standard parameter.\n\nBuilding with CMake requires the Ninja build tool.\n\n\u003e **NOTE**: There is some support which is required in the Swift compiler itself in\n\u003e order to build the Swift stanard library.  This includes support for the\n\u003e architecture and the OS spelling.  Without this, the target may not be\n\u003e recognised properly and the Standard Library may fail to compile.\n\nThe following builds a release (optimized) configuration of the statically\nlinked variant of the standard library for a freestanding ELF environment:\n```\ncmake -B out -D BUILD_SHARED_LIBS=NO -D CMAKE_BUILD_TYPE=Release -D CMAKE_Swift_COMPILER_TARGET=aarch64-unknown-none-elf -D CMAKE_Swift_COMPILER_WORKS=YES -G Ninja -S .\nninja -C out\n```\n\n\u003e **NOTE**: This support requires patches to the Swift compiler which have not yet\n\u003e been merged.  The changes are available at\n\u003e [apple/swift#35970](https://github.com/apple/swift/pull/35970).\n\n### Parameters\n\n1. `BUILD_SHARED_LIBS`: Boolean\u003cbr/\u003e\nIndicates if the libraries should be shared (dynamically linked) or not.\n\n1. `CMAKE_Swift_COMPILER_TARGET`: String\u003cbr/\u003e\nIdentifiers the target triple of the platform that the standard library should\nbe built.  Defaults to the build.\n\n1. `CMAKE_Swift_COMPILER_WORKS`: Boolean\u003cbr/\u003e\nRequired parameter.  Must always specify a true boolean value.  This is required\nto skip the checks that the compiler can build code for the target.  The Swift\ncompiler cannot build code without the standard library available.  Because we\nare building the standard library, we must skip the checks and assume that the\ncompiler functions properly.\n\n## Artifacts\n\n\u003cdl\u003e\n  \u003cdt\u003eswiftCore.dll/libswiftCore.so/libswiftCore.dylib\u003c/dt\u003e\n  \u003cdd\u003eThe runtime component of the standard library.\u003c/dd\u003e\n  \u003cdt\u003eswiftCore.lib/libswiftCore.so/libswiftCore.dylib\u003c/dt\u003e\n  \u003cdd\u003eThe build/SDK component of the standard library for linking.\u003c/dd\u003e\n  \u003cdt\u003eSwift.swiftmodule\u003c/dt\u003e\n  \u003cdd\u003eThe build/SDK component of the standard library for building.\u003c/dd\u003e\n\u003c/dl\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompnerd%2Fuswift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompnerd%2Fuswift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompnerd%2Fuswift/lists"}