{"id":30291785,"url":"https://github.com/Beariish/bolt","last_synced_at":"2025-08-17T00:04:21.911Z","repository":{"id":309243868,"uuid":"572128786","full_name":"Beariish/bolt","owner":"Beariish","description":"High-performance, real-time optimized, and statically typed embedded language implemented in C.","archived":false,"fork":false,"pushed_at":"2025-08-10T20:29:01.000Z","size":1353,"stargazers_count":46,"open_issues_count":6,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-10T20:29:39.944Z","etag":null,"topics":["bytecode","c","embeddable","interpreter","language","scripting-language"],"latest_commit_sha":null,"homepage":"","language":"C","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/Beariish.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}},"created_at":"2022-11-29T16:02:02.000Z","updated_at":"2025-08-10T20:29:04.000Z","dependencies_parsed_at":"2025-08-10T20:29:42.488Z","dependency_job_id":"e022f7b6-11c6-4fd7-8b9b-4ba09dc7593b","html_url":"https://github.com/Beariish/bolt","commit_stats":null,"previous_names":["beariish/bolt"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Beariish/bolt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beariish%2Fbolt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beariish%2Fbolt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beariish%2Fbolt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beariish%2Fbolt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Beariish","download_url":"https://codeload.github.com/Beariish/bolt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beariish%2Fbolt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270786529,"owners_count":24644567,"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-08-16T02:00:11.002Z","response_time":91,"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":["bytecode","c","embeddable","interpreter","language","scripting-language"],"created_at":"2025-08-17T00:02:24.487Z","updated_at":"2025-08-17T00:04:21.240Z","avatar_url":"https://github.com/Beariish.png","language":"C","readme":"# ⚡ Bolt\r\nA *lightweight*, **lightning-fast**, type-safe embeddable language for real-time applications. \r\n\r\n```ts\r\nimport print, error, Error from core\r\nimport abs, epsilon from math\r\n\r\n// The return type of safe_divide is inferred to be `Error | number`\r\nfn safe_divide(a: number, b: number) {\r\n    if abs(b) \u003c epsilon {\r\n        return error(\"Cannot divide by zero!\")\r\n    }\r\n\r\n    return a / b\r\n}\r\n\r\nmatch let result = safe_divide(10, 5) {\r\n    is Error {\r\n        // The type of result is narrowed in this branch!\r\n        print(\"Failed to divide:\", result.what)\r\n    }\r\n\r\n    is number {\r\n        print(\"The answer is\", result)\r\n    }\r\n}\r\n```\r\n\r\n## Features\r\n* [Lightning-fast performance](https://github.com/Beariish/bolt/blob/main/doc/Bolt%20Performance.md), outperforming other languages in its class\r\n* Compact implementation, leaving a minimal impact on build size while remaining consise enough to browse. \r\n* Blazingly quick compilation, plow through code at over 500kloc/thread/second. That's 50'000 lines in the blink of an eye.\r\n* Ease of embedding, only a handful of lines to get going\r\n* Rich type system to catch errors before code is ran, with plenty of support for extending it from native code\r\n* Embed-first design, prioritizing inter-language performance and agility  \r\n\r\n## Links\r\n* **[Bolt programming guide](https://github.com/Beariish/bolt/blob/main/doc/Bolt%20Programming%20Guide.md)**\r\n* **[Bolt standard library reference](https://github.com/Beariish/bolt/tree/main/doc/Bolt%20Standard%20Library)**\r\n* **[Bolt embedding and API reference](https://github.com/Beariish/bolt/tree/main/doc/Bolt%20Embedding%20Guide.md)**\r\n* **[Bolt performance](https://github.com/Beariish/bolt/blob/main/doc/Bolt%20Performance.md)**\r\n* **[Notable Bolt users](https://github.com/Beariish/bolt/blob/main/doc/Bolt%20Users.md)**\r\n\r\n## Dependencies \r\nBolt only depends on the C standard library as well as `libm` on Unix-based systems.\r\nSome standard library modules include things like file and system IO, but these can be disabled easily.\r\nBy default, Bolt sets up an environment that uses `malloc`/`realloc`/`free`, but this is also easy to configure.\r\nBolt also embeds my other library [picomatch](https://github.com/Beariish/picomatch) for regex parsing\r\n\r\n## Minimal embedding example\r\nThe [bolt-cli](https://github.com/Beariish/bolt/blob/main/bolt-cli/main.c) program provides a very consice example of how to embed bolt an an application, see the [Bolt embedding guide](https://github.com/Beariish/bolt/tree/main/doc/Bolt%20Embedding%20Guide.md) for more details.\r\n\r\n## Language examples\r\nThe [examples](https://github.com/Beariish/bolt/tree/main/examples) folder contains a few short examples of ideomatically written bolt code. Check out the [tests](https://github.com/Beariish/bolt/tree/main/tests) and [benchmarks](https://github.com/Beariish/bolt/tree/main/benchmarks) folders as wel for some more in-depth language overview.\r\n\r\n## Building\r\nBolt currently only builds on x64. 32-bit architectures are explicitly not supported, arm and riscv are untested.\r\nRunning `cmake` in the root directory of the project will generate a static library for the language, as well as the CLI tool.\r\nFor more information and options regarding embedding Bolt in your application, see `bt_config.h`.\r\nSee below for the status of Bolt on each relevant compiler. \r\n\r\n## Compiler Status\r\nPlease note that Bolt is **not** yet stable, expect to encounter compiler bugs and crashes. If you do, opening an issue with replicable Bolt code would be much appreciated 😊\r\n\r\n[![Build Status](https://github.com/Beariish/bolt/actions/workflows/cmake-multi-platform.yml/badge.svg)](https://github.com/Beariish/bolt/actions/workflows/cmake-multi-platform.yml)\r\n| Compiler | Status | Reason |\r\n| -------- | ------ | ------ |\r\n| MSVC     | ✅     | no issues |\r\n| GCC      | ✅🟨  | all functional, some warnings |\r\n| Clang    | ✅🟨  | all functional, some warnings |\r\n\r\n## Contributing\r\nBolt is a very opinionated project, and any contributions should take the vision into account.\r\n\r\nBugfixes are likely to be accepted as long as they're within reason and don't change any expected behaviour. Adding tests in case of regression is very much appreciated as well. A clean run of `/tests/all` is expected of course.\r\n\r\nOptimizations may also be accepted for minor versions under similar criteria. A before/after run of `/benchmarks/all` is expected to evaluate the impact and make sure nothing else regresses. If the specific optimization isn't captured in any existing benchmark, adding one is required.\r\n\r\nFeature additions will need a lot of consideration, Bolt is very intentionally minimal in its' design and featureset. I highly suggest you submit some kind of proposal or plan before starting any significant work on a feature to review. Use cases, performance, and implementation cost will all be expected to be justified.\r\n\r\n## License\r\nBolt is licensed under MIT. See LICENSE for more information.\r\n\r\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBeariish%2Fbolt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBeariish%2Fbolt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBeariish%2Fbolt/lists"}