{"id":32162850,"url":"https://github.com/boardgame-dsl/boardgame","last_synced_at":"2025-10-21T14:02:42.866Z","repository":{"id":52795721,"uuid":"335284720","full_name":"Boardgame-DSL/boardgame","owner":"Boardgame-DSL","description":"Modeling boardgames","archived":false,"fork":false,"pushed_at":"2021-05-12T06:59:31.000Z","size":181,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-27T21:28:39.906Z","etag":null,"topics":["asterius","boardgame","wasm"],"latest_commit_sha":null,"homepage":"https://boardgame-dsl.github.io/","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Boardgame-DSL.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-02T12:39:38.000Z","updated_at":"2024-01-10T13:05:59.000Z","dependencies_parsed_at":"2022-08-22T11:40:17.885Z","dependency_job_id":null,"html_url":"https://github.com/Boardgame-DSL/boardgame","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Boardgame-DSL/boardgame","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boardgame-DSL%2Fboardgame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boardgame-DSL%2Fboardgame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boardgame-DSL%2Fboardgame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boardgame-DSL%2Fboardgame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Boardgame-DSL","download_url":"https://codeload.github.com/Boardgame-DSL/boardgame/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boardgame-DSL%2Fboardgame/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280272340,"owners_count":26302260,"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","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["asterius","boardgame","wasm"],"created_at":"2025-10-21T14:02:19.520Z","updated_at":"2025-10-21T14:02:42.859Z","avatar_url":"https://github.com/Boardgame-DSL.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Boardgames\n\nKandidatarbete at [CTH](https://www.chalmers.se/) by [Jennifer Krogh](https://github.com/jenniferkrogh),\n[Mattias Mattsson](https://github.com/matmat), [Emma Pettersson](https://github.com/emmouto),\n[Simon Sundqvist](https://github.com/Zinfour), [Carl Wiede](https://github.com/carlwiede),\nand [Mårten Åsberg](https://github.com/89netraM).\n\n[Project description/proposal](https://www.chalmers.se/SiteCollectionDocuments/CSE/Kandidatprojekt2021/Datx02-21-06_Spr%C3%A5k_br%C3%A4dspel.pdf)\n(in Swedish)\n\n[Group page](https://chalmers.instructure.com/groups/69903/wiki)\n(access restricted)\n\n## Description\n\nA library with the basis for modeling and playing boardgames. Comes with\nbuilt-in functions for playing games through a web interface (requires WASM\ncompilation).\n\n## Development\n\nWe use `cabal` for development.\n\nThe library is located in `./src`. During development\n`cabal repl \u003cpath/to/file\u003e` can be useful to test new features of the library.\n\nA example executable is located in `./executable`. Use `cabal run boardgame` to\ntest it.\n\nA test suite is located in `./tests`. Use `cabal test` to run it.\n\n## UI Development\n\nThe UI side of this project is targeting the web by compiling the Haskell code\nto WASM with [Asterius](https://github.com/tweag/asterius/).\n\n### Setup\n\nThe easies way to use Asterius is with their prebuilt Docker container, here is\nhow you do it:\n\n1. Firstly you need to install Docker, just follow the instructions from\n   [Docker docs](https://docs.docker.com/get-docker/).\n2. Once Docker is up and running, run the Asterius container with the following\n   command\n   ```sh\n   docker run -it -v $(pwd):/workspace -w /workspace terrorjack/asterius\n   ```\n   Where `$(pwd)` is the absolute path to this directory. Docker will mount this\n   directory to the \"workspace\", where you can use all the Asterius commands.\n3. The first time you use the container you must [\"boot\"](https://asterius.netlify.app/architecture.html#about-booting)\n   Asterius, it is also a good idea to update cabal. Do that with these\n   commands:\n   ```sh\n   ahc-boot \u0026\u0026 ahc-cabal new-update\n   ```\n   Together they take about 20 minutes, and then you ready.\n\n### Building\n\nWell up and running, you should use `ahc-cabal` instead of `cabal` to compile\nthe project, we've also have a flag for activating the WASM features.\nBuilding the executable should look like this now:\n```sh\nahc-cabal new-build exe:boardgame --flags=\"wasm\"\n```\n\nBut building targeting WASM doesn't actually get us anything useful. To\ntransform the output to `.wasm` and `.js` you can use `ahc-dist`. Run the\nfollowing command:\n```sh\nahc-dist --browser --bundle \\\n\t--input-exe path/to/boardgame \\\n\t--output-directory /absolute/path/to/existing/out-directory\n```\nThe `--input-exe` is the path to the output of building the project, it's\nprobably `dist-newstyle/build/x86_64-linux/ghc-8.8.4/boardgame-0.1.0.0/x/boardgame/opt/build/boardgame/boardgame`\nfrom the root of the project.\n\nIn your output directory you'll now find `boardgame.wasm` and `boardgame.js`,\nand an example HTML file `boardgame.html` showing how to use them. Open\n`boardgame.html` in a web server (can't load WASM from a local file), open the\nconsole in your web browser, and play around with the `window.boardgame` object.\n\nIf you wish to have a UI to play around with, you can mode the `boardgame.wasm`\nand `boardgame.js` files over to the example of the [boardgame.js](https://github.com/Boardgame-DSL/boardgame.js)\nrepo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboardgame-dsl%2Fboardgame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboardgame-dsl%2Fboardgame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboardgame-dsl%2Fboardgame/lists"}