{"id":47942738,"url":"https://github.com/paulcadman/lean-ios","last_synced_at":"2026-04-04T08:13:13.315Z","repository":{"id":345384755,"uuid":"1185700652","full_name":"paulcadman/lean-ios","owner":"paulcadman","description":"Build Lean apps for iOS","archived":false,"fork":false,"pushed_at":"2026-03-28T19:04:33.000Z","size":519,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-28T21:07:15.622Z","etag":null,"topics":["ios","lean","lean4"],"latest_commit_sha":null,"homepage":"","language":"C","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/paulcadman.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":"2026-03-18T21:24:38.000Z","updated_at":"2026-03-28T19:04:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/paulcadman/lean-ios","commit_stats":null,"previous_names":["paulcadman/lean4-ios","paulcadman/lean-ios"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/paulcadman/lean-ios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulcadman%2Flean-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulcadman%2Flean-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulcadman%2Flean-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulcadman%2Flean-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulcadman","download_url":"https://codeload.github.com/paulcadman/lean-ios/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulcadman%2Flean-ios/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31392378,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ios","lean","lean4"],"created_at":"2026-04-04T08:13:12.654Z","updated_at":"2026-04-04T08:13:13.307Z","avatar_url":"https://github.com/paulcadman.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## lean4-ios\n\nThis repository contains a modified Lean4 source tree with changes to let the\nLean runtime and stage0 standard library be built with the iOS toolchain and\nlinked into iOS apps.\n\nFor an overview of the project structure and build dependencies, see [Architecture](docs/architecture.md).\n\nIt also includes:\n\n### Flappy bird\n\nA flappy bird clone that uses SDL to render the game.\n\n```\nmake -C example-flappy run-sim-app\n```\n\nThis is the game running in the iOS simulator:\n\nhttps://github.com/user-attachments/assets/05215072-60f6-4cef-9fff-9e5d9b611874\n\n### A SDL iOS app \n\nThis app demonstrates a Lean program that uses SDL to make an SDL app with animated 2D graphics.\n\n```\nmake -C example-sdl-app run-sim-app\n```\n\nThis is the SDL app running in an iOS simulator:\n\nhttps://github.com/user-attachments/assets/aa9b99ea-b496-4393-a35a-fe3d0679409e\n\n## A minimal example iOS app\n\nThis app demonstrates how a Lean function can be called from an iOS app.\n\n```\nmake -C example-app sim-app\n```\n\nThis is what the example app looks like:\n\n![Screenshot of the simulator running the example app](assets/hello-lean.png)\n\nThe build works as follows:\n\n1. [example-app/lean/Example.lean](example-app/lean/Example.lean) is compiled to C.\n2. The generated C is compiled for the iOS target.\n3. [example-app/native/LeanIOSBridge.cpp](example-app/native/LeanIOSBridge.cpp)\n   initializes the Lean module and exposes a small C interface.\n4. [example-app/native/App/main.swift](example-app/native/App/main.swift) calls\n   that bridge from a native iOS app.\n5. The app is linked against the compiled Lean object, the iOS-built stage0\n   `libInit.a` and `libleanrt.a`.\n   \n## Useful Makefile targets:\n\n- `make runtime` - builds the Lean4 runtime for iOS\n- `make stdlib-init` - builds the Lean4 stage0 standard library for iOS\n- `make -C example-app sim-app` - builds example-app for iOS simulator\n- `make -C example-app run-sim-app` - starts a simulator, deploys / runs the iOS example app\n- `make -C example-sdl-app sim-app` - build the example-sdl-app for iOS simulator \n- `make -C example-sdl-app run-sim-app` - starts a simulator, deploys / runs the iOS example SDL app\n- `make -C example-flappy sim-app` - build flappy bird for iOS simulator \n- `make -C example-flappy run-sim-app` - starts a simulator, deploys / runs the flappy bird app\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulcadman%2Flean-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulcadman%2Flean-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulcadman%2Flean-ios/lists"}