{"id":17116190,"url":"https://github.com/dduan/brainass","last_synced_at":"2025-04-13T04:27:24.030Z","repository":{"id":66950632,"uuid":"152843908","full_name":"dduan/BrainAss","owner":"dduan","description":"A Brainfuck to WebAssembly compiler written in Haskell","archived":false,"fork":false,"pushed_at":"2018-10-27T21:48:12.000Z","size":9,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T21:22:05.763Z","etag":null,"topics":["brainfuck","haskell","wasm","wasm-example","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/dduan.png","metadata":{"files":{"readme":"README.md","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":"2018-10-13T06:47:53.000Z","updated_at":"2019-05-23T16:38:28.000Z","dependencies_parsed_at":"2023-03-14T07:00:38.452Z","dependency_job_id":null,"html_url":"https://github.com/dduan/BrainAss","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dduan%2FBrainAss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dduan%2FBrainAss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dduan%2FBrainAss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dduan%2FBrainAss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dduan","download_url":"https://codeload.github.com/dduan/BrainAss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248662774,"owners_count":21141629,"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":["brainfuck","haskell","wasm","wasm-example","webassembly"],"created_at":"2024-10-14T17:48:08.105Z","updated_at":"2025-04-13T04:27:24.023Z","avatar_url":"https://github.com/dduan.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# *Brain*fuck to Web*Ass*embly compiler\n\nThis is a Brainfuck to WebAssembly compiler.\n\nTo use it, you'll need a recent [GHC][0] and [wat2wasm][1] installed in your\nenvironment.\n\nRun `make compile-compiler` (or `ghc brainass.hs`) to compile the compiler.\n\nRun `./brainass` (or whatever you compiled `brainass.hs` to) to read how to use\nthe compiler. It should print the following.\n\n```\nUsage: compile IMPORTED_INPUT IMPORTED_OUTPUT EXPORT\nwhere\n  IMPORTED_INPUT  is imported Javascript function for Brainfuck's ,\n  IMPORTED_OUTPUT is imported Javascript function for Brainfuck's .\n  EXPORT is the exported Javascript function from the WASM module\n\nBrainfuck source is read fro STDIN and text wasm is written to STDOUT\n(similar to `cat`)\n\nExample:\n  cat source.bf \u003e compile bf.getchar bf.putchar bf \u003e main.wat\n  makes wasm module import bf.getchar as \",\" and bf.putchar as \".\"\n  and the wasm module exports a function named bf.\n```\n\nRunning `make build-and-run-helloworld` will:\n1. build the compiler in local directory as `./compile`.\n2. compile a hello world program in Brainfuck to main.wasm\n3. launch a server at http://localhost:8000/play.html which runs the wasm\n   program\n\nYou can read this make command, as well as `play.{js,html}` to learn how to use\nthe compiler as well.\n\n[0]: https://www.haskell.org/ghc/\n[1]: https://github.com/WebAssembly/wabt#running-wat2wasm-and-wast2json\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdduan%2Fbrainass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdduan%2Fbrainass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdduan%2Fbrainass/lists"}