{"id":13992885,"url":"https://github.com/T-Brick/lean2wasm","last_synced_at":"2025-07-22T16:32:29.413Z","repository":{"id":212341890,"uuid":"730881436","full_name":"T-Brick/lean2wasm","owner":"T-Brick","description":"Tool for compiling Lean to WASM","archived":false,"fork":false,"pushed_at":"2024-03-17T22:16:26.000Z","size":13,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-10T14:11:57.484Z","etag":null,"topics":["lean","lean4","wasm"],"latest_commit_sha":null,"homepage":"","language":"Lean","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/T-Brick.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}},"created_at":"2023-12-12T22:03:48.000Z","updated_at":"2024-07-08T13:09:53.000Z","dependencies_parsed_at":"2023-12-22T22:24:06.813Z","dependency_job_id":"73fe0c57-ff6f-40a8-b92d-b2ba40fb811a","html_url":"https://github.com/T-Brick/lean2wasm","commit_stats":null,"previous_names":["t-brick/lean2wasm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-Brick%2Flean2wasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-Brick%2Flean2wasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-Brick%2Flean2wasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-Brick%2Flean2wasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/T-Brick","download_url":"https://codeload.github.com/T-Brick/lean2wasm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227133916,"owners_count":17735825,"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":["lean","lean4","wasm"],"created_at":"2024-08-09T14:02:10.020Z","updated_at":"2024-11-29T13:31:28.107Z","avatar_url":"https://github.com/T-Brick.png","language":"Lean","funding_links":[],"categories":["Lean"],"sub_categories":[],"readme":"# Lean2Wasm\n\nTool to compile Lean4 code to WASM. Right now this is really just for me to test\nthings out. So actually using it is a little scuffed right now :)\n\nThis is largely a translation of [these instructions](https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/wasm.20build/near/402692669)\ninto something that can be executed.\n\nThis requires [emcc](https://emscripten.org/docs/getting_started/downloads.html)\nto already be installed.\n\n## Usage\n\nRun `lake build test` to build the test program. Then run `lake build` to build\nthe utility. Running `lake exe lean2wasm` will compile the `Main` program.\n\nOnce compiled, you can run `node .lake/build/wasm/main.js` to run the program.\nAlternatively you can use `lake run js`.\n\nIf you want to change what is being compiled, in `Lean2Wasm.lean` just change\nthe `root` variable.\n\n## Example\n\n[Here](https://github.com/T-Brick/c0_web_driver) is an example of embedding lean\ninto a webpage. Importantly, we have to use the `MODULARIZE` flag so that we\ncan invoke the `main` function multiple times since there are issues with doing\nso without resetting the emscripten runtime (specifically, emscripten generates\na factory function which can then be invoked to initialise the runtime again\nand call `main`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FT-Brick%2Flean2wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FT-Brick%2Flean2wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FT-Brick%2Flean2wasm/lists"}