{"id":47784916,"url":"https://github.com/firefly-zero/bulb-parser","last_synced_at":"2026-05-17T21:01:22.285Z","repository":{"id":344146268,"uuid":"1125157251","full_name":"firefly-zero/bulb-parser","owner":"firefly-zero","description":"💡 Rust crate for parsing and interpreting Bulb Script files","archived":false,"fork":false,"pushed_at":"2026-05-16T17:25:18.000Z","size":126,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-16T18:36:11.214Z","etag":null,"topics":["bulb-script","firefly-zero","gamedev","interpreter","parser","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/firefly-zero.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-30T08:33:58.000Z","updated_at":"2026-01-03T16:17:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/firefly-zero/bulb-parser","commit_stats":null,"previous_names":["firefly-zero/bulb-parser"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/firefly-zero/bulb-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firefly-zero%2Fbulb-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firefly-zero%2Fbulb-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firefly-zero%2Fbulb-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firefly-zero%2Fbulb-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firefly-zero","download_url":"https://codeload.github.com/firefly-zero/bulb-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firefly-zero%2Fbulb-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33155542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["bulb-script","firefly-zero","gamedev","interpreter","parser","rust"],"created_at":"2026-04-03T14:22:17.780Z","updated_at":"2026-05-17T21:01:22.280Z","avatar_url":"https://github.com/firefly-zero.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bulb-parser\n\nParser and interpreter for [Bulb Script](https://docs.fireflyzero.com/dev/bulb/), a scripting language for making simple adventure games for [Firefly Zero](https://fireflyzero.com/).\n\nThis is a zero-dependency environment-agnostic Rust crate. The interpreter wrapper for running Bulb games on Firefly Zero lives in the [firefly-bulb](https://github.com/firefly-zero/firefly-bulb) repo.\n\n## Installation\n\n```bash\ncargo add bulb-parser\n```\n\n## Usage\n\nParse the file and get pretty and efficient grouped structs for all sections:\n\n```rust\nlet script = \"...\";\nlet sections = bulb_parser::parse(script).unwrap();\n```\n\nWe `unwrap` here but you probably want to nicely handle the error and show it to the user.\n\nMake a state manager (aka interpreter) and run some actions:\n\n```rust\nlet mut state = bulb_parser::State::new(sections);\nstate.enqueue(\"action_id\");\nloop {\n    let Some(action) = state.pop() else {\n        break;\n    };\n    state.apply(action);\n}\n```\n\nState takes ownership of Sections but you can still access it as `State.sections` attribute.\n\nActions are poped explicitly so that you can get into the loop and run additional logic on some specific actions. Namely, handle `Action::Say` to display text messages.\n\n## Stability\n\nWe plan to keep backward compatibility for the scripting language but the structs representing them may change significantly. If you're making an interpreter for Bulb, be ready to adjust your code for new features with almost every release. On the positive side, the Rust type checker is a good guide!\n\n## License\n\nMIT License. Make some cool Bulb interpreters and editors, open-source or not. Happy hacking!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirefly-zero%2Fbulb-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirefly-zero%2Fbulb-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirefly-zero%2Fbulb-parser/lists"}