{"id":33927012,"url":"https://github.com/finnbear/raton","last_synced_at":"2026-04-07T17:31:06.399Z","repository":{"id":320161751,"uuid":"1081027362","full_name":"finnbear/raton","owner":"finnbear","description":"Tiny scripting language for Rust 🐁","archived":false,"fork":false,"pushed_at":"2025-11-01T00:21:37.000Z","size":208,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-13T18:37:24.853Z","etag":null,"topics":["embedded-language","rust","rust-crate","scripting-language"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/raton","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/finnbear.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","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-10-22T07:53:58.000Z","updated_at":"2025-11-01T00:21:41.000Z","dependencies_parsed_at":"2025-10-31T10:14:01.982Z","dependency_job_id":null,"html_url":"https://github.com/finnbear/raton","commit_stats":null,"previous_names":["finnbear/raton"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/finnbear/raton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnbear%2Fraton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnbear%2Fraton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnbear%2Fraton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnbear%2Fraton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/finnbear","download_url":"https://codeload.github.com/finnbear/raton/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnbear%2Fraton/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31522194,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["embedded-language","rust","rust-crate","scripting-language"],"created_at":"2025-12-12T10:40:22.571Z","updated_at":"2026-04-07T17:31:06.364Z","avatar_url":"https://github.com/finnbear.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ratón 🐁\n\n[![Documentation](https://docs.rs/raton/badge.svg)](https://docs.rs/raton)\n[![crates.io](https://img.shields.io/crates/v/raton.svg)](https://crates.io/crates/raton)\n[![Build](https://github.com/finnbear/raton/actions/workflows/build.yml/badge.svg)](https://github.com/finnbear/raton/actions/workflows/build.yml)\n[![unsafe forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/)\n\nA tiny, highly modular, embeddable, dynamically typed scripting language with a bytecode VM, intended for use in games.\n\n## Example\n\n```toml\n[dependences]\nraton = {\n  version = \"0\",\n  features = [\"i32_type\", \"while_loop\", \"single_line_comment\"],\n  default-features = false\n}\n```\n```rust\n// Add up all integers from 1 to n\nfn sum_to_n(n) {\n    let i = 0;\n    let sum = 0;\n    while (i \u003c n) {\n        i = i + 1;\n        sum = sum + i;\n    }\n    return sum;\n}\n```\n\n## Components\n- [x] Parser\n- [x] Bytecode generator\n- [x] Bytecode VM\n- [ ] Optimizer\n- [ ] Debugger\n- [ ] Modular standard library\n\n## Modular type system\n- [x] `null`\n- [x] `bool` (optional `bool_type` feature)\n- [x] `i32` (optional `i32_type` feature)\n- [x] `f32` (optional `f32_type` feature)\n- [x] `string` (optional `string_type` feature)\n- [x] Host value (optional `extern_value` feature)\n- [x] Host immutable/mutable reference\n\n## Modular language features\n- [x] `if`, `else` (optional `if_expression` feature)\n- [x] `.method()` (optional `method_call_expression` feature)\n- [x] `while`, `break`, `continue` (optional `while_loop` feature)\n- [x] `//` comments (optional `single_line_comment` feature)\n- [x] `/* */` comments (optional `multi_line_comment` feature)\n\n## Serialization\n- [x] `serde` (ast and bytecode)\n- [x] `bitcode` (bytecode only)\n\n## Other features\n\n- [x] Portable to any platform, 32 bits or higher, supported by Rust\n- [x] Parsing, code generation, and runtime have configurable limits\n- [x] Error handling and reporting\n- [x] Optional error if an operation produces `f32::NaN`\n- [ ] `no_std`\n\n## Performance\n\n### Latency\n\n| Operation               | Overhead    | Heap allocations (amortized) |\n| ----------------------- | ----------- | ---------------------------- |\n| Create VM (4 host fn's) | 150ns       | 2                            |\n| Host -\u003e script fn call  | 50ns        | 0                            |\n| Script -\u003e host fn call  | 20ns        | 0                            |\n\n### Throughput\n\nRatón takes ~0.4s on `Fibonacci` and ~0.05s on `1M Loop` on an i7-7700k (see [Rhai benchmarks](https://rhai.rs/book/about/benchmarks.html)).\n\n## Security\n\nRatón is designed to handle untrusted or malicious source code, asts, or bytecode\nwithout panicking, exhausting memory, memory unsafety, exponential time complexity,\nor infinite loop. Unsafe code is forbidden, and each component has a fuzzer that\ntests it against arbitrary inputs.\n\nTODO:\n- [ ] Limit length of string values\n\nYou are responsible for using the limits, such as on instructions and call stack\ndepth, that it provides.\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0\n   ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license\n   ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinnbear%2Fraton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinnbear%2Fraton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinnbear%2Fraton/lists"}