{"id":51097006,"url":"https://github.com/dr-montasir/webio_macros","last_synced_at":"2026-06-24T07:30:34.023Z","repository":{"id":338110695,"uuid":"1156617525","full_name":"dr-montasir/webio_macros","owner":"dr-montasir","description":"Procedural macros for the WebIO ultra-low-latency framework.","archived":false,"fork":false,"pushed_at":"2026-03-23T23:37:49.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-24T22:36:16.707Z","etag":null,"topics":["framework","macro","macros","rust","web"],"latest_commit_sha":null,"homepage":"https://webio.tech","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dr-montasir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2026-02-12T21:17:51.000Z","updated_at":"2026-03-23T23:37:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dr-montasir/webio_macros","commit_stats":null,"previous_names":["dr-montasir/webio_macros"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dr-montasir/webio_macros","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr-montasir%2Fwebio_macros","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr-montasir%2Fwebio_macros/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr-montasir%2Fwebio_macros/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr-montasir%2Fwebio_macros/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dr-montasir","download_url":"https://codeload.github.com/dr-montasir/webio_macros/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr-montasir%2Fwebio_macros/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34722553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"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":["framework","macro","macros","rust","web"],"created_at":"2026-06-24T07:30:33.243Z","updated_at":"2026-06-24T07:30:34.014Z","avatar_url":"https://github.com/dr-montasir.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🦅 webio_macros\n\n**Procedural macros for the WebIO ultra-low-latency framework.**\n\n`webio_macros` provides the high-level attribute sugar for the [WebIO](https://crates.io/crates/webio) ecosystem. Its primary goal is to provide a clean developer experience without introducing any external dependencies or runtime overhead.\n\n## 🛠 Installation\n\nRun the following Cargo `command` in your project directory:\n\n```shell\ncargo add webio webio_macros\n```\n\nOr add `webio` and `webio_macros` as a dependencies in your `Cargo.toml`:\n\n```toml\n[dependencies]\nwebio = \"MAJOR.MINOR.PATCH\" # Replace with the latest version\nwebio_macros = \"MAJOR.MINOR.PATCH\" # Replace with the latest version\n```\n\n## 🚀 The Entry Point\n\nThe flagship macro `#[webio_main]` enables the definition of an application entry point using standard `async fn main()` syntax.\n\n### Why use `#[webio_main]`?\n\n1. **Zero-Dependency Philosophy**: Written using only the built-in `proc_macro` library.\n2. **Boilerplate Reduction**: Automatically handles the transition from synchronous OS threads to the WebIO async world.\n3. **Turbo Performance**: Wraps code in the `webio::block_on` engine, maintaining **70µs - 400µs** response times.\n\n## ⚡ High-Speed Templates\n\nWebIO includes a built-in, zero-dependency template engine via the `replace!` and `html!` macros. These perform efficient string transformations during compilation.\n\n### `replace!` \u0026 `html!`\n\nThe `replace!` macro is a versatile tool for substituting `{{key}}` placeholders in any content. The `html!` macro acts as a semantic alias for web-specific development.\n\n- **Efficiency**: No regex or heavy parsers; uses optimized string replacement.\n- **Raw String Support**: Works perfectly with `r#\"\"#` for embedding complex code or HTML.\n- **Extensible**: Designed so developers can wrap it in their own `macro_rules!` (e.g., `css!`, `sql!`).\n\n#### Example:\n```rust\nuse webio_macros::{replace, html};\n\nlet user = \"Ahmed\";\n// Using the core replace engine\nlet msg = replace!(\"Hello {{name}}\", name = user);\n\n// Using the semantic HTML alias\nlet view = html!(r#\"\u003cdiv class=\"user\"\u003e{{name}}\u003c/div\u003e\"#, name = user);\n```\n\n## 📖 Usage\n\n```rust,no_run\nuse webio::*;\nuse webio_macros::{webio_main, html};\n\n#[webio_main]\nasync fn main() {\n    let mut app = WebIo::new();\n\n    app.route(GET, \"/\", |_, _| async {\n        let content = html!(\"\u003ch1\u003eHello from 🦅 {{name}}!\u003c/h1\u003e\", name = \"WebIO\");\n        Reply::new(StatusCode::Ok)\n            .header(\"Content-Type\", \"text/html; charset=UTF-8\")\n            .body(content)\n    });\n\n    app.run(\"127.0.0.1\", \"8080\");\n}\n```\n\n## ⚖️ License\n\nLicensed under the MIT License. Built for performance.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdr-montasir%2Fwebio_macros","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdr-montasir%2Fwebio_macros","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdr-montasir%2Fwebio_macros/lists"}