{"id":13994948,"url":"https://github.com/apple/pkl-swift-examples","last_synced_at":"2025-07-11T14:38:11.147Z","repository":{"id":220557789,"uuid":"748702827","full_name":"apple/pkl-swift-examples","owner":"apple","description":"Examples for using Pkl within Swift applications","archived":false,"fork":false,"pushed_at":"2025-03-12T19:02:56.000Z","size":21,"stargazers_count":83,"open_issues_count":2,"forks_count":10,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-07-02T05:45:46.039Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apple.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":"CONTRIBUTING.adoc","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.adoc","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.adoc","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-26T15:24:47.000Z","updated_at":"2025-06-01T18:17:49.000Z","dependencies_parsed_at":"2024-09-24T20:41:37.114Z","dependency_job_id":null,"html_url":"https://github.com/apple/pkl-swift-examples","commit_stats":null,"previous_names":["apple/pkl-swift-examples"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/apple/pkl-swift-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fpkl-swift-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fpkl-swift-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fpkl-swift-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fpkl-swift-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apple","download_url":"https://codeload.github.com/apple/pkl-swift-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fpkl-swift-examples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264833292,"owners_count":23670617,"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-09T14:03:11.438Z","updated_at":"2025-07-11T14:38:11.087Z","avatar_url":"https://github.com/apple.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"= pkl-swift-example\n\nThis is a sample project that demonstrates Pkl \u003c\u003e Swift integration.\n\nThis is a basic HTTP server that is configured via Pkl in the `pkl/` directory.\n\n== Requirements\n\n* Swift +5.9\n* Pkl +0.25.0\n\n== Project structure\n\n[cols=\"1,1\"]\n|===\n| Directory\n| Description\n\n| `pkl/`\n| Pkl configuration sources\n\n| `Sources/Gen/`\n| Generated Swift sources from Pkl\n\n| `Sources/App/`\n| Swift files\n|===\n\n== Codegen\n\nGenerated sources are already checked into git for learning purposes.\n\nTo generate new Pkl sources, first install the Swift code generator:\n\n[source,bash]\n----\ncurl https://github.com/apple/pkl-swift/releases/download/0.2.0/pkl-gen-swift-macos.bin -o pkl-gen-swift\nchmod +x pkl-gen-swift\n----\n\nWith that installed, generate Swift sources via:\n\n[source,bash]\n----\npkl-gen-swift pkl/**.pkl -o Sources/Gen\n----\n\n== Running the server\n\nTo run the project call `swift run`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapple%2Fpkl-swift-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapple%2Fpkl-swift-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapple%2Fpkl-swift-examples/lists"}