{"id":16113290,"url":"https://github.com/borisboutillier/rs-cellular-automata","last_synced_at":"2025-03-17T18:30:34.105Z","repository":{"id":39131925,"uuid":"259378893","full_name":"BorisBoutillier/rs-cellular-automata","owner":"BorisBoutillier","description":"Rust playground project on 1-dimension cellular automata, with command line and gtk GUI and WASM implementation","archived":false,"fork":false,"pushed_at":"2023-01-07T18:04:06.000Z","size":1062,"stargazers_count":8,"open_issues_count":19,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-10T20:11:09.373Z","etag":null,"topics":["cellular-automaton","cli","gtk","gtk3","rust","rust-lang","wasm","wasm-bindgen","wasm-example","wasm-pack"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/BorisBoutillier.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}},"created_at":"2020-04-27T15:49:49.000Z","updated_at":"2024-04-16T08:02:34.000Z","dependencies_parsed_at":"2023-02-07T19:30:48.271Z","dependency_job_id":null,"html_url":"https://github.com/BorisBoutillier/rs-cellular-automata","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/BorisBoutillier%2Frs-cellular-automata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorisBoutillier%2Frs-cellular-automata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorisBoutillier%2Frs-cellular-automata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorisBoutillier%2Frs-cellular-automata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BorisBoutillier","download_url":"https://codeload.github.com/BorisBoutillier/rs-cellular-automata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221698777,"owners_count":16865917,"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":["cellular-automaton","cli","gtk","gtk3","rust","rust-lang","wasm","wasm-bindgen","wasm-example","wasm-pack"],"created_at":"2024-10-09T20:10:49.973Z","updated_at":"2024-10-27T15:28:30.547Z","avatar_url":"https://github.com/BorisBoutillier.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cellular automata\nThis is playground project to tackle the Rust language.\nThe goal is to play around with 1-dimension cellular automata with different kind of user interaction, CLI, GUI or WEB.\n\nThe workspace consist in 4 crates:\n- automata-lib : The main library that contains the automata computation and its rules.\n- automata-cli : a CLI interface to automata-lib with output as text or direct image file.\n- automata-gtk : a GUI interface to automata-lib in GTK.\n- automata-wasm : A web page using WASM for interfacing with automata-lib and javascript for gui part\n\n# Compiling\n\n## Prerequisites\n\n* [rust](https://www.rust-lang.org)\n* [wasm-pck](https://rustwasm.github.io/wasm-pack/installer/)\n* [npm](https://www.npmjs.com/get-npm)\n\n## Compiling\nThe compilation for automata-lib, automata-cli and automata-gtk is simply using cargo build command:\n```sh\ncargo build --release\n```\nThe compilation for automata-wasm requires using wasm-pack:\n```sh\ncd automata-wasm\nwasm-pack build\n```\n\n# CLI\nHelp for all available option \n```sh\nautomata-cli --help\n```\n## text output in the terminal\n```sh\nautomata-cli --colors 2 --rule 30 --steps=10 --width=20\n```\n```\n|          *         |\n|         ***        |\n|        **  *       |\n|       ** ****      |\n|      **  *   *     |\n|     ** **** ***    |\n|    **  *    *  *   |\n|   ** ****  ******  |\n|  **  *   ***     * |\n| ** **** **  *   ***|\n```\n\n## image output\n```sh\nautomata-cli --colors 4 --rule 16673 --steps 320  --width 640 --output 4C_16673.320.png\n```\n![alt text](https://github.com/Bobox214/rs-cellular-automata/blob/master/outputs/4C_16673.320.png \"Colors 4 Rule 16673 320 steps\")\n\n# GUI\nGUI with all controls is simply launched with :\n```sh\nautomata-gtk\n```\n\n![alt text](https://github.com/Bobox214/rs-cellular-automata/blob/master/outputs/Screenshot-gtk.png \"GTK GUI\")\n\n# WASM\n\nTo start the web-page using npm , after building with wasm-pack :\n```sh\ncd automata-wasm/www\nnpm install\nnpm run star\n```\nYou can then open your browser on localhost:8080/ and play with cellular automata !\n\n![alt text](https://github.com/Bobox214/rs-cellular-automata/blob/master/outputs/Screenshot-wasm.png \"Web View\")\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborisboutillier%2Frs-cellular-automata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborisboutillier%2Frs-cellular-automata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborisboutillier%2Frs-cellular-automata/lists"}