{"id":27910630,"url":"https://github.com/eric7237cire/rgb_delivery","last_synced_at":"2026-05-05T20:35:10.530Z","repository":{"id":34741489,"uuid":"181060799","full_name":"eric7237cire/rgb_delivery","owner":"eric7237cire","description":"A Solver for RGB Express.  Uses Rust, WebAssembly, WebWorkers, TypeScript, and Angular","archived":false,"fork":false,"pushed_at":"2023-01-14T00:35:52.000Z","size":5280,"stargazers_count":0,"open_issues_count":38,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T10:46:16.024Z","etag":null,"topics":["angular7","rust","typescript","typings","webassembly","webpack"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/eric7237cire.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}},"created_at":"2019-04-12T18:10:10.000Z","updated_at":"2023-01-31T17:15:06.000Z","dependencies_parsed_at":"2023-01-15T08:53:57.241Z","dependency_job_id":null,"html_url":"https://github.com/eric7237cire/rgb_delivery","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/eric7237cire%2Frgb_delivery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eric7237cire%2Frgb_delivery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eric7237cire%2Frgb_delivery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eric7237cire%2Frgb_delivery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eric7237cire","download_url":"https://codeload.github.com/eric7237cire/rgb_delivery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252661161,"owners_count":21784562,"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":["angular7","rust","typescript","typings","webassembly","webpack"],"created_at":"2025-05-06T09:48:52.862Z","updated_at":"2026-05-05T20:35:10.484Z","avatar_url":"https://github.com/eric7237cire.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/eric7237cire/poker.svg?branch=master)](https://travis-ci.org/eric7237cire/poker)\n\n# ![Rust](http://rust-lang.org/logos/rust-logo-32x32.png) 🦀 🕸️ A grid solver for [RGB Express](http://rgbexpress.com/) ![Rust](http://rust-lang.org/logos/rust-logo-32x32.png) \n\n[RGB Express](http://rgbexpress.com/) is an excellent strategy Android game.  It helps to download \u0026 play before looking at the solver.\n\nBasically you have to get each van (V) pick up a block (B) and return it to the target warehouse (T).   The van and warehouse must be the same color.\nEach van can hold 3 blocks, the 'poppers', if active, will pop the top block off the Van.  Poppers are activated before starting the level.  \n\n\nComponent/tech flow:\n\nWASM =\u003e Web Worker \u003c=\u003e Angular 7\n\nThus Angular has no knowledge of the WebAssembly, using only WebWorker messages, but it does use the typings generated.  Thus if a new attribute/etc. is \nadded to the public classes/interfaces (exposed by Serde), the typescript transpilation will show errors.\n\n\n## The Algorithm\n\nJust a brute force search with some pruning done with connected components calculated \nwith the Union Find / Disjoint Set datastructure.\n\n## Components\n\n### grid-editor\n\nAngular 7 front end, grid editor \u0026 runs the search.\n\n![Screenshot](./readme_images/grid_editor_42.gif)\n\nLanguage: TypeScript\n\n### web_worker\n\nCode based on a [public repo](https://github.com/rustwasm/rust-wasm-worker-template).\n\nPackages the WASM using a stand alone webpack as a Web worker.  Too much of a PITA to get angular cli\nto play nicely.  \n\nBuild as a local only npm module, exposing a browser asset and the typings.\n\nLanguage: TypeScript\n\nTo setup, see the [Travis Configuration](.travis.yml) \n\n\n\n### rgb-solver\n\nWASM Source.  Unit tests run in x86 (or linux on travis)\n\nLanguage: Rust\n\nTo setup, see the [The Watch Bat File](/devops/build-wasm.bat) \n\n\n\n### wasm-typescript-definition\n\nCode based on a [public repo](https://github.com/tcr/wasm-typescript-definition) of same name.\n\nModified to produce better *.d.ts types for typescript.  Most useful is generating union types which match nicely with Rusts variant enums.\n\nTypeScript has nice support for [discriminated unions](https://basarat.gitbooks.io/typescript/docs/types/discriminated-unions.html) which let you do a checked switch on the attribute type.\n\nBuilt automatically when rgb-solver is built.\n\nExample:\n\nTyping generated:\n\n```typescript\nexport type Road = {\n    ...\n};\n\nexport type Bridge = {\n    ...\n};\n\n//derive struct\nexport type Warehouse = {\n    ...\n};\n\nexport type TileEnum = TileRoad | TileWarehouse | TileBridge | Empty\n\nexport type TileEnum = TileRoad | TileWarehouse | TileBridge | Empty\nexport type TileRoad = {type: \"TileRoad\"} \u0026 Road\nexport type TileWarehouse = {type: \"TileWarehouse\"} \u0026 Warehouse\nexport type TileBridge = {type: \"TileBridge\"} \u0026 Bridge\nexport type Empty = {type: \"Empty\" }\nexport type TileEnum_type = \"TileRoad\" | \"TileWarehouse\" | \"TileBridge\" | \"Empty\"\n```\n\nRust:\n\n```rust\n#[derive(Clone, Serialize, Deserialize, Debug, TypescriptDefinition, Hash, Eq, PartialEq)]\n#[serde(tag = \"type\")]\npub enum TileEnum {\n    TileRoad(Road),\n    TileWarehouse (Warehouse),\n    TileBridge(Bridge),\n    Empty\n}\n```\n\n\n# Deploying to [git hub pages](https://eric7237cire.github.io/rgb_delivery/)\n\nDone by travis, see the [Travis Configuration](.travis.yml) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feric7237cire%2Frgb_delivery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feric7237cire%2Frgb_delivery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feric7237cire%2Frgb_delivery/lists"}