{"id":16336850,"url":"https://github.com/angerman/haskell-to-web","last_synced_at":"2026-01-24T15:35:09.588Z","repository":{"id":79904419,"uuid":"164665172","full_name":"angerman/haskell-to-web","owner":"angerman","description":"Haskell to Web compilation Experiments","archived":false,"fork":false,"pushed_at":"2019-04-01T10:03:46.000Z","size":12046,"stargazers_count":10,"open_issues_count":3,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-18T00:44:39.039Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/angerman.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-01-08T14:23:01.000Z","updated_at":"2024-11-27T13:53:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"76f12c32-35ae-41d5-9825-0790b5213285","html_url":"https://github.com/angerman/haskell-to-web","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/angerman/haskell-to-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angerman%2Fhaskell-to-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angerman%2Fhaskell-to-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angerman%2Fhaskell-to-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angerman%2Fhaskell-to-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angerman","download_url":"https://codeload.github.com/angerman/haskell-to-web/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angerman%2Fhaskell-to-web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28730322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"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":[],"created_at":"2024-10-10T23:45:08.996Z","updated_at":"2026-01-24T15:35:09.564Z","avatar_url":"https://github.com/angerman.png","language":null,"readme":"* Haskell to Web compilation survey\n\nThere are three haskell to web compilers in varying maturity levels.\n- [[https://github.com/ghcjs/ghcjs][ghcjs]] the oldest haskell to web compiler that produces JavaScript.\n- [[https://github.com/tweag/asterius][Asterius]] a haskell to webassembly compiler.\n- [[https://github.com/WebGHC][WebGHC]] a webassembly code generator for ghc.\n\n** Building\n\nPlease refer to the relevant notes regarding building of the\ncompilers.\n\n|          | Linux | macOS | Windows |\n| ghcjs    | Yes   | Yes   |         |\n| Asterius | Yes   | No    |         |\n| WebGHC   | Yes   | Yes   |         |\n\nNotes: [[ghcjs-build-notes.org][ghcjs]] [[webghc-build-notes.org][WebGHC]]\n\n** Features\n\n** Compiling applications / libraries\n\n*** ghcjs\n\n**** building\n#+BEGIN_SRC bash\ncabal new-build --project-file=ghcjs.project --ghcjs exe:$app -fexamples --allow-newer\n#+END_SRC\n\n**** optimizing\nOne option is to pass ~-dedupe~, which should reduce the resulting\nsize. The other is to use googles closure compiler to optimize it.\n\nIt turns out that sometimes ~-dedupe~ will increase the size, but\nmake the result more favorable to the googles closure compiler.\n\n#+BEGIN_SRC bash\nccjs all.js --compilation_level=ADVANCED_OPTIMIZATIONS --jscomp_off=checkVars --externs=node --externs=all.js.externs \u003e all.adv.min.js\n#+END_SRC\n(see [[https://github.com/ghcjs/ghcjs/wiki/Deployment][ghcjs deployment wiki]])\n\n*** Asterius\n\n**** building\n#+BEGIN_SRC bash\n\n#+END_SRC\n**** optimizing\n\n*** WebGHC\n\n**** building\n#+BEGIN_SRC bash\nwasm32-unknown-unknown-wasm-cabal new-build --project-file=webghc.project exe:$app -fjsaddle-wasm -fexamples --allow-newer\n#+END_SRC\n\n**** optimizing\nThe wasm files could be optimized with ~binaryen~'s ~wasm-opt -Os~.\nWebpackifying the javascript support could result in dramatic\nsavings. (TODO)\n\n\n*** A selection of [[http://haskell-miso.org][miso]] apps (these do not require TH)\n\n|          | ghcjs (total) | ghcjs (ccjs; dedupe; dedupe+ccjs) | Asterius | Asterius (opt) | WebGHC (total; wasm only) | WebGHC (opt) |\n| todo-mvc | [[https://angerman.github.io/haskell-to-web/ghcjs/todo-mvc.jsexe/index.html][link]] (5.2M)   | 3.7M; 5.7M; 3.2M                  |          |                | [[https://angerman.github.io/haskell-to-web/webghc/todo-mvc/index.html][link]] (18M; 4.6M)          |              |\n| mario    | [[https://angerman.github.io/haskell-to-web/ghcjs/mario.jsexe/index.html][link]] (4.0M)   | 2.9M; 4.4M; 2.6M                  |          |                | [[https://angerman.github.io/haskell-to-web/webghc/mario/index.html][link]] (18M; 4.5M)          |              |\n| flatris  | [[https://angerman.github.io/haskell-to-web/ghcjs/flatris.jsexe/index.html][link]] (7.6M)   | 5.4M; 6.9M; 4.2M                  |          |                | [[https://angerman.github.io/haskell-to-web/webghc/flatris/index.html][link]] (18M; 5.2M)          |              |\n| snake    | :(            |                                   |          |                | :(                        |              |\n| 2048     | [[https://angerman.github.io/haskell-to-web/ghcjs/2048.jsexe/index.html][link]] (5.4M)   | 3.9M; 6.0M; 3.4M                  |          |                | [[https://angerman.github.io/haskell-to-web/webghc/2048/index.html][link]] (18M; 4.7M)          |              |\n| simple   | [[https://angerman.github.io/haskell-to-web/ghcjs/simple.jsexe/index.html][link]] (3.8M)   | 2.8M; 4.3M; 2.5M                  |          |                | [[https://angerman.github.io/haskell-to-web/webghc/simple/index.html][link]] (18M; 4.4M)          |              |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangerman%2Fhaskell-to-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangerman%2Fhaskell-to-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangerman%2Fhaskell-to-web/lists"}