{"id":22696097,"url":"https://github.com/zdimension/inline-vbs","last_synced_at":"2025-10-03T21:32:37.808Z","repository":{"id":62440912,"uuid":"464787689","full_name":"zdimension/inline-vbs","owner":"zdimension","description":"Embed VBScript code inside Rust code files","archived":false,"fork":false,"pushed_at":"2023-04-29T12:55:25.000Z","size":39,"stargazers_count":62,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-07T23:49:24.712Z","etag":null,"topics":["active-scripting","clean-code","rust","vbs","vbscript"],"latest_commit_sha":null,"homepage":"","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/zdimension.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-01T07:26:54.000Z","updated_at":"2025-02-04T19:55:23.000Z","dependencies_parsed_at":"2023-02-09T17:15:35.581Z","dependency_job_id":null,"html_url":"https://github.com/zdimension/inline-vbs","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdimension%2Finline-vbs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdimension%2Finline-vbs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdimension%2Finline-vbs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdimension%2Finline-vbs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zdimension","download_url":"https://codeload.github.com/zdimension/inline-vbs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248658547,"owners_count":21140962,"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":["active-scripting","clean-code","rust","vbs","vbscript"],"created_at":"2024-12-10T04:14:14.274Z","updated_at":"2025-10-03T21:32:32.767Z","avatar_url":"https://github.com/zdimension.png","language":"Rust","readme":"# inline-vbs\n\n`inline-vbs` is a crate that allows you to embed VBScript, JScript and many other languages inside Rust code files. It uses\nthe [Active Scripting](https://docs.microsoft.com/en-us/archive/msdn-magazine/2000/december/active-scripting-apis-add-powerful-custom-debugging-to-your-script-hosting-app) COM APIs to dynamically parse and execute (optionally, evaluate) code.\n\n![image](https://user-images.githubusercontent.com/4533568/212424549-7440814e-64b4-4deb-853f-b28531904670.png)\n\n\n## Basic usage\n```rust\nuse inline_vbs::*;\n\nfn main() {\n    vbs! { On Error Resume Next } // tired of handling errors?\n    vbs! { MsgBox \"Hello, world!\" }\n    let language = \"VBScript\";\n    assert_eq!(vbs_!['language \u0026 \" Rocks!\"], \"VBScript Rocks!\".into());\n}\n```\nMacros:\n* `vbs!` - Executes a statement or evaluates an expression (depending on context)\n* `vbs_!` - Evaluates an expression\n* `vbs_raw!` - Executes a statement (string input instead of tokens, use for multiline code)\n  See more examples in [tests/tests.rs](tests/tests.rs).\n\n## Installation\nAdd this to your `Cargo.toml`:\n```toml\n[dependencies]\ninline-vbs = \"0.4.0\"\n```\n\n**Important:** You need to have the MSVC Build Tools installed on your computer, as required by [cc](https://github.com/rust-lang/cc-rs).\n\n### Language support\n\nVBScript (`vbs!`) and JScript (`js!`) are available out of the box on 32-bit and 64-bit.\n\nOther Active Scripting engines exist:\n- Ruby (`ruby!`): ActiveScriptRuby [1.8 (tested, 32-bit only)](https://www.artonx.org/data/asr/ActiveRuby.msi)\n  - [2.4 (32 or 64-bit) (untested!)](https://www.artonx.org/data/asr/), you need to change the CLSID in [src/vbs.cpp](src/vbs.cpp)\n- Perl (`perl!`): [ActivePerl 5.20 (32-bit)](https://raw.githubusercontent.com/PengjieRen/LibSum/master/ActivePerl-5.20.2.2002-MSWin32-x86-64int-299195.msi)\n\nNote: install an engine matching the bitness of your program; by default Rust on Windows builds \n64-bit programs, which can only use 64-bit libraries. If you want to use a 32-bit library, you\nneed to build your program with `--target i686-pc-windows-msvc`.\n\n## Limitations\nMany. \n\n## Motivation\nN/A\n\n## License\nThis project is licensed under either of\n* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or\n  https://www.apache.org/licenses/LICENSE-2.0)\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or\n  https://opensource.org/licenses/MIT)\n  at your option.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdimension%2Finline-vbs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzdimension%2Finline-vbs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdimension%2Finline-vbs/lists"}