{"id":24269984,"url":"https://github.com/katharostech/dynamite","last_synced_at":"2025-09-24T09:31:29.015Z","repository":{"id":57622558,"uuid":"341059938","full_name":"katharostech/dynamite","owner":"katharostech","description":"A language-agnostic scripting solution for Rust programs","archived":false,"fork":false,"pushed_at":"2021-03-07T21:48:53.000Z","size":90,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-05T00:41:44.093Z","etag":null,"topics":["binding","bindings","rust","wasm"],"latest_commit_sha":null,"homepage":null,"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/katharostech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-22T02:43:35.000Z","updated_at":"2022-05-24T09:06:53.000Z","dependencies_parsed_at":"2022-09-16T18:00:57.071Z","dependency_job_id":null,"html_url":"https://github.com/katharostech/dynamite","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/katharostech/dynamite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katharostech%2Fdynamite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katharostech%2Fdynamite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katharostech%2Fdynamite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katharostech%2Fdynamite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/katharostech","download_url":"https://codeload.github.com/katharostech/dynamite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katharostech%2Fdynamite/sbom","scorecard":{"id":551606,"data":{"date":"2025-08-11","repo":{"name":"github.com/katharostech/dynamite","commit":"99ca07482e3c256150cc9a8ffcf83aa3291652a2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/14 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"20 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: RUSTSEC-2021-0145 / GHSA-g98v-hv3f-hcfr","Warn: Project is vulnerable to: RUSTSEC-2024-0375","Warn: Project is vulnerable to: RUSTSEC-2022-0078 / GHSA-f85w-wvc7-crwc","Warn: Project is vulnerable to: RUSTSEC-2020-0159","Warn: Project is vulnerable to: RUSTSEC-2022-0041 / GHSA-qc84-gqf4-9926","Warn: Project is vulnerable to: RUSTSEC-2024-0388","Warn: Project is vulnerable to: RUSTSEC-2023-0051","Warn: Project is vulnerable to: RUSTSEC-2020-0146 / GHSA-3358-4f7f-p4j4","Warn: Project is vulnerable to: RUSTSEC-2024-0384","Warn: Project is vulnerable to: RUSTSEC-2023-0058 / GHSA-36xm-35qq-795w","Warn: Project is vulnerable to: RUSTSEC-2023-0057 / GHSA-ghc8-5cgm-5rpf","Warn: Project is vulnerable to: GHSA-2326-pfpj-vx3h","Warn: Project is vulnerable to: RUSTSEC-2023-0086","Warn: Project is vulnerable to: RUSTSEC-2021-0119 / GHSA-76w9-p8mg-j927 / GHSA-wgrg-5h56-jg27","Warn: Project is vulnerable to: RUSTSEC-2024-0436","Warn: Project is vulnerable to: RUSTSEC-2022-0013 / GHSA-m5pq-gvj9-9vr8","Warn: Project is vulnerable to: RUSTSEC-2021-0127","Warn: Project is vulnerable to: RUSTSEC-2018-0015","Warn: Project is vulnerable to: RUSTSEC-2022-0006 / GHSA-9hpw-r23r-xgm5","Warn: Project is vulnerable to: RUSTSEC-2020-0071 / GHSA-wcg3-cvx6-7396"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T11:02:26.156Z","repository_id":57622558,"created_at":"2025-08-20T11:02:26.156Z","updated_at":"2025-08-20T11:02:26.156Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276724355,"owners_count":25693371,"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-09-24T02:00:09.776Z","response_time":97,"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":["binding","bindings","rust","wasm"],"created_at":"2025-01-15T15:48:30.571Z","updated_at":"2025-09-24T09:31:28.734Z","avatar_url":"https://github.com/katharostech.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dynamite\n\n[![Crates.io](https://img.shields.io/crates/v/dynamite)](https://crates.io/crates/dynamite)\n[![Docs.rs](https://docs.rs/dynamite/badge.svg)](https://docs.rs/dynamite)\n[![Katharos License](https://img.shields.io/badge/License-Katharos-blue)](https://github.com/katharostech/katharos-license)\n\nDynamite is a language-agnostic scripting system for the Rust programming language. Dynamite\nmakes it easy to integrate scripting languages into your Rust program and is special in the way\nthat it orchestrates communication not only between the host program and the scripting\nlanguages, but also allows each scripting language to interact with data in the other scripting\nlanguages as well.\n\nDynamite is not currently usable, but is being developed as a component for the [Arsenal] game\nengine.\n\n## Example\n\n### Host Application\n\n```rust\nuse std::collections::HashMap;\nuse dynamite::*;\n\n/// A Rust function that we want to create bindings to so that it can be called from other lanuguage\n/// adapters.\nfn rust_func() {\n    println!(\"Hello from Rust!!\");\n}\n\n/// The built-in \"language adapter\" that will provide bindings to our native Rust\nstruct NativeLanguageAdapter;\n\n// We implement [`LanguageAdapter`] which is responsible for supplying the [`ScriptApi`] which\n// details the available types layouts and functions provided by the adapter, and for calling\n// functions provided by the adapter at the request of other adapters or the host.\n//\n// For this adapter\n// we are just going to be providing a binding to the `rust_func` defined above. This function can\n// then be called from other adapters such as the Python adapter loaded from a dynamic library\n// below.\nimpl LanguageAdapter for NativeLanguageAdapter {\n    fn get_api(\u0026self, _host_functions: \u0026dyn HostFunctions) -\u003e ScriptApi {\n        let mut api = ScriptApi::new();\n\n        api.insert(\n            \"native::rust_func\".into(),\n            ScriptType::Function(FunctionDefinition {\n                arguments: HashMap::new(),\n                return_type: None,\n            }),\n        );\n\n        api\n    }\n\n    fn call_function(\n        \u0026self,\n        _host_functions: \u0026dyn HostFunctions,\n        path: \u0026str,\n        _args: \u0026[*const Void],\n    ) -\u003e *const Void {\n        if path == \"native::rust_func\" {\n            rust_func();\n            std::ptr::null()\n        } else {\n            panic!(\"Function not defined\");\n        }\n    }\n}\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    // Initialize dynamite\n    let mut dynamite = Dynamite::new();\n\n    // Add our native Rust adapter\n    dynamite.add_language_adapter(Box::new(NativeLanguageAdapter))?;\n\n    // Load langauge adapter ( relatively safe, but still unsafe because dynamic libraries could do\n    // _anything_ 👀 )\n    unsafe {\n        dynamite.load_dynamic_library_language_adapter(\"./target/debug/libdynamite_python.so\")?\n    };\n\n    // Print discovered api\n    dbg!(dynamite.get_full_api());\n\n    // Call a function provided by the language adapter ( just assuming for this example that we\n    // know ahead of time that this function exists, it would error if it didn't ). This is also\n    // unsafe because your language adapter could mis-behave.\n    let arg1 = \u002642f32;\n    unsafe {\n        dynamite.call_function(\n            \u0026\"python::test_function\".to_string(),\n            \u0026[arg1 as *const f32 as *const Void],\n        );\n    }\n\n    Ok(())\n}\n```\n\n### Language Adapter\n\n_This isn't really a Python language adapter, it's really just Rust, but we'll add Python later 😉_\n\n```rust\nuse std::collections::HashMap;\nuse dynamite::*;\n\n/// The Dynamite Python language adapter\n#[language_adapter]\nstruct PythonAdapter;\n\nimpl DynamicLibLanguageAdapter for PythonAdapter {\n    /// Initialize adapter\n    fn init_adapter() -\u003e Self {\n        PythonAdapter\n    }\n}\n\nimpl LanguageAdapter for PythonAdapter {\n    /// Get the adapter's API\n    fn get_api(\u0026self, _host_functions: \u0026dyn HostFunctions) -\u003e ScriptApi {\n        let mut components = ScriptApi::default();\n\n        components.insert(\n            \"python::test_function\".into(),\n            ScriptType::Function(FunctionDefinition {\n                arguments: {\n                    let mut h = HashMap::new();\n\n                    h.insert(\"number\".into(), \"std::f32\".into());\n\n                    h\n                },\n                return_type: None,\n            }),\n        );\n\n        components\n    }\n\n    /// Call functions provided by this adapter\n    fn call_function(\n        \u0026self,\n        host_functions: \u0026dyn HostFunctions,\n        path: \u0026str,\n        args: \u0026[*const dynamite::Void],\n    ) -\u003e *const dynamite::Void {\n        if path == \"python::test_function\" {\n            let arg1 = args[0];\n\n            let number = unsafe { \u0026*(arg1 as *const f32) };\n\n            println!(\"The number is: {}\", number);\n\n            dbg!(host_functions.get_full_api());\n\n            unsafe {\n                host_functions.call_function(\u0026\"native::rust_func\".to_string(), \u0026[]);\n            }\n        }\n\n        std::ptr::null()\n    }\n}\n```\n\n[Arsenal]: https://github.com/katharostech/arsenal\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatharostech%2Fdynamite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkatharostech%2Fdynamite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatharostech%2Fdynamite/lists"}