{"id":13504045,"url":"https://github.com/rune-rs/rune","last_synced_at":"2025-12-12T11:54:58.689Z","repository":{"id":38211904,"uuid":"282516483","full_name":"rune-rs/rune","owner":"rune-rs","description":"An embeddable dynamic programming language for Rust.","archived":false,"fork":false,"pushed_at":"2025-05-04T06:22:19.000Z","size":13966,"stargazers_count":1908,"open_issues_count":100,"forks_count":95,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-05-13T00:14:51.794Z","etag":null,"topics":["embedded","programming-language","scripting"],"latest_commit_sha":null,"homepage":"https://rune-rs.github.io","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rune-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2020-07-25T20:03:40.000Z","updated_at":"2025-05-12T09:48:54.000Z","dependencies_parsed_at":"2023-09-26T20:57:30.172Z","dependency_job_id":"aff2bd12-5f5a-4130-8ad4-e8758ab1b6d4","html_url":"https://github.com/rune-rs/rune","commit_stats":{"total_commits":1129,"total_committers":31,"mean_commits":36.41935483870968,"dds":0.1328609388839681,"last_synced_commit":"1418c6c42842db8013f2ffd7c1bd505a0201b2da"},"previous_names":["udoprog/stk"],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rune-rs%2Frune","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rune-rs%2Frune/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rune-rs%2Frune/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rune-rs%2Frune/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rune-rs","download_url":"https://codeload.github.com/rune-rs/rune/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843225,"owners_count":21972874,"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":["embedded","programming-language","scripting"],"created_at":"2024-07-31T23:00:53.089Z","updated_at":"2025-12-12T11:54:53.634Z","avatar_url":"https://github.com/rune-rs.png","language":"Rust","readme":"\u003cimg alt=\"rune logo\" src=\"https://raw.githubusercontent.com/rune-rs/rune/main/assets/icon.png\" /\u003e\n\u003cbr\u003e\n\u003ca href=\"https://rune-rs.github.io\"\u003e\u003cb\u003eVisit the site 🌐\u003c/b\u003e\u003c/a\u003e\n\u0026mdash;\n\u003ca href=\"https://rune-rs.github.io/book/\"\u003e\u003cb\u003eRead the book 📖\u003c/b\u003e\u003c/a\u003e\n\n# rune\n\n\u003ca href=\"https://github.com/rune-rs/rune\"\u003e\u003cimg alt=\"github\" src=\"https://img.shields.io/badge/github-rune--rs/rune-8da0cb?style=for-the-badge\u0026logo=github\" height=\"20\"\u003e\u003c/a\u003e\n\u003ca href=\"https://crates.io/crates/rune\"\u003e\u003cimg alt=\"crates.io\" src=\"https://img.shields.io/crates/v/rune.svg?style=for-the-badge\u0026color=fc8d62\u0026logo=rust\" height=\"20\"\u003e\u003c/a\u003e\n\u003ca href=\"https://docs.rs/rune\"\u003e\u003cimg alt=\"docs.rs\" src=\"https://img.shields.io/badge/docs.rs-rune-66c2a5?style=for-the-badge\u0026logoColor=white\u0026logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K\" height=\"20\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/rune-rs/rune/actions?query=branch%3Amain\"\u003e\u003cimg alt=\"build status\" src=\"https://img.shields.io/github/actions/workflow/status/rune-rs/rune/ci.yml?branch=main\u0026style=for-the-badge\" height=\"20\"\u003e\u003c/a\u003e\n\u003ca href=\"https://discord.gg/v5AeNkT\"\u003e\u003cimg alt=\"chat on discord\" src=\"https://img.shields.io/discord/558644981137670144.svg?logo=discord\u0026style=flat-square\" height=\"20\"\u003e\u003c/a\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\nThe Rune Language, an embeddable dynamic programming language for Rust.\n\n\u003cbr\u003e\n\n## Contributing\n\nIf you want to help out, please have a look at [Open Issues].\n\n\u003cbr\u003e\n\n## Highlights of Rune\n\n* Runs a compact representation of the language on top of an efficient\n  [stack-based virtual machine][support-virtual-machine].\n* Clean [Rust integration 💻][support-rust-integration].\n* [Multithreaded 📖][support-multithreading] execution.\n* [Hot reloading 📖][support-hot-reloading].\n* Memory safe through [reference counting 📖][support-reference-counted].\n* [Awesome macros 📖][support-macros] and [Template literals 📖][support-templates].\n* [Try operators 📖][support-try] and [Pattern matching 📖][support-patterns].\n* [Structs and enums 📖][support-structs] with associated data and\n  functions.\n* Dynamic containers like [vectors 📖][support-dynamic-vectors], [objects\n  📖][support-anon-objects], and [tuples 📖][support-anon-tuples] all with\n  out-of-the-box [serde support 💻][support-serde].\n* First-class [async support 📖][support-async] with [Generators 📖][support-generators].\n* Dynamic [instance functions 📖][support-instance-functions].\n* [Stack isolation 📖][support-stack-isolation] between function calls.\n\n\u003cbr\u003e\n\n## Rune scripts\n\nYou can run Rune programs with the bundled CLI:\n\n```text\ncargo run --bin rune -- run scripts/hello_world.rn\n```\n\nIf you want to see detailed diagnostics of your program while it's running,\nyou can use:\n\n```text\ncargo run --bin rune -- run scripts/hello_world.rn --dump --trace\n```\n\nSee `--help` for more information.\n\n\u003cbr\u003e\n\n## Running scripts from Rust\n\n\u003e You can find more examples [in the `examples` folder].\n\nThe following is a complete example, including rich diagnostics using\n[`termcolor`]. It can be made much simpler if this is not needed.\n\n[`termcolor`]: https://docs.rs/termcolor\n\n```rust\nuse rune::{Context, Diagnostics, Source, Sources, Vm};\nuse rune::termcolor::{ColorChoice, StandardStream};\nuse std::sync::Arc;\n\nlet context = Context::with_default_modules()?;\nlet runtime = Arc::new(context.runtime()?);\n\nlet mut sources = Sources::new();\nsources.insert(Source::memory(\"pub fn add(a, b) { a + b }\")?);\n\nlet mut diagnostics = Diagnostics::new();\n\nlet result = rune::prepare(\u0026mut sources)\n    .with_context(\u0026context)\n    .with_diagnostics(\u0026mut diagnostics)\n    .build();\n\nif !diagnostics.is_empty() {\n    let mut writer = StandardStream::stderr(ColorChoice::Always);\n    diagnostics.emit(\u0026mut writer, \u0026sources)?;\n}\n\nlet unit = result?;\nlet mut vm = Vm::new(runtime, Arc::new(unit));\n\nlet output = vm.call([\"add\"], (10i64, 20i64))?;\nlet output: i64 = rune::from_value(output)?;\n\nprintln!(\"{}\", output);\n```\n\n[in the `examples` folder]: https://github.com/rune-rs/rune/tree/main/examples/examples\n[Open Issues]: https://github.com/rune-rs/rune/issues\n[support-anon-objects]: https://rune-rs.github.io/book/objects.html\n[support-anon-tuples]: https://rune-rs.github.io/book/tuples.html\n[support-async]: https://rune-rs.github.io/book/async.html\n[support-dynamic-vectors]: https://rune-rs.github.io/book/vectors.html\n[support-generators]: https://rune-rs.github.io/book/generators.html\n[support-hot-reloading]: https://rune-rs.github.io/book/hot_reloading.html\n[support-instance-functions]: https://rune-rs.github.io/book/instance_functions.html\n[support-macros]: https://rune-rs.github.io/book/macros.html\n[support-multithreading]: https://rune-rs.github.io/book/multithreading.html\n[support-patterns]: https://rune-rs.github.io/book/pattern_matching.html\n[support-reference-counted]: https://rune-rs.github.io/book/variables.html\n[support-rust-integration]: https://github.com/rune-rs/rune/tree/main/crates/rune-modules\n[support-serde]: https://github.com/rune-rs/rune/blob/main/crates/rune-modules/src/json.rs\n[support-stack-isolation]: https://rune-rs.github.io/book/call_frames.html\n[support-structs]: https://rune-rs.github.io/book/structs.html\n[support-templates]: https://rune-rs.github.io/book/template_literals.html\n[support-try]: https://rune-rs.github.io/book/try_operator.html\n[support-virtual-machine]: https://rune-rs.github.io/book/the_stack.html\n","funding_links":[],"categories":["Command Line","Libraries","Rust","库 Libraries","Uncategorized","programming-language"],"sub_categories":["Dependency Management","Scripting","脚本 Scripting","Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frune-rs%2Frune","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frune-rs%2Frune","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frune-rs%2Frune/lists"}