{"id":24340876,"url":"https://github.com/opensvm/zup","last_synced_at":"2025-09-28T02:30:43.857Z","repository":{"id":273014647,"uuid":"912636074","full_name":"openSVM/zup","owner":"openSVM","description":"zig api server","archived":false,"fork":false,"pushed_at":"2025-01-18T03:22:53.000Z","size":27,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-18T03:25:50.009Z","etag":null,"topics":["bunjs","high-load","high-performance","nodejs","zig","zig-http","zig-package"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/openSVM.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}},"created_at":"2025-01-06T04:44:16.000Z","updated_at":"2025-01-18T03:22:54.000Z","dependencies_parsed_at":"2025-01-18T03:37:29.138Z","dependency_job_id":null,"html_url":"https://github.com/openSVM/zup","commit_stats":null,"previous_names":["opensvm/zup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openSVM%2Fzup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openSVM%2Fzup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openSVM%2Fzup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openSVM%2Fzup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openSVM","download_url":"https://codeload.github.com/openSVM/zup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234475351,"owners_count":18839363,"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":["bunjs","high-load","high-performance","nodejs","zig","zig-http","zig-package"],"created_at":"2025-01-18T07:12:30.374Z","updated_at":"2025-09-28T02:30:38.498Z","avatar_url":"https://github.com/openSVM.png","language":"Zig","readme":"# Zup Server\n\nA high-performance HTTP and WebSocket server framework written in Zig, designed for building scalable web applications with built-in parallel computing capabilities via SPICE integration.\n\n## Features\n\n- 🚀 Multi-threaded HTTP server with automatic CPU core detection\n- 🔌 WebSocket support with automatic upgrade handling\n- 💪 Keep-alive connection support for improved performance\n- 🔄 Integration with SPICE for parallel computing tasks\n- 📊 Built-in benchmarking tools\n- 🧪 Comprehensive test suite\n\n## Installation\n\n1. Ensure you have Zig 0.11.0 or later installed\n2. Clone the repository:\n```bash\ngit clone https://github.com/yourusername/zup.git\ncd zup\n```\n\n## Building\n\nBuild the project using Zig's build system:\n\n```bash\nzig build\n```\n\nThis will create the following executables in `zig-out/bin/`:\n- `server`: The main server executable\n- `example-server`: An example server implementation\n- `benchmark`: Benchmarking tool\n\n## Usage\n\n### Running the Server\n\nStart the server on localhost:8080:\n\n```bash\nzig build run\n```\n\nOr run directly:\n\n```bash\n./zig-out/bin/server\n```\n\n### Example Server\n\nRun the example server implementation:\n\n```bash\nzig build example\n```\n\n### Running Tests\n\nRun the test suite:\n\n```bash\nzig build test\n```\n\nRun framework-specific tests:\n\n```bash\nzig build test-framework\n```\n\n### Benchmarking\n\nRun HTTP benchmarks:\n\n```bash\nzig build bench\n```\n\n## API Documentation\n\n### HTTP Server\n\nThe core server provides a simple interface for handling HTTP requests:\n\n```zig\nconst std = @import(\"std\");\nconst Server = @import(\"main.zig\").Server;\n\npub fn main() !void {\n    var gpa = std.heap.GeneralPurposeAllocator(.{}){};\n    defer _ = gpa.deinit();\n    const allocator = gpa.allocator();\n\n    const address = try std.net.Address.parseIp(\"127.0.0.1\", 8080);\n    var server = try Server.init(allocator, address);\n    defer server.deinit();\n\n    try server.start();\n}\n```\n\n### WebSocket Support\n\nThe server automatically handles WebSocket upgrades and provides a simple message-based API:\n\n```zig\n// WebSocket frame handling example\nconst ws = @import(\"websocket.zig\");\n\n// Echo server implementation\nwhile (true) {\n    const frame = try ws.readMessage(stream);\n    defer allocator.free(frame.payload);\n\n    switch (frame.opcode) {\n        .text, .binary =\u003e try ws.writeMessage(stream, frame.payload),\n        .close =\u003e break,\n        else =\u003e {},\n    }\n}\n```\n\n### Framework Module\n\nThe framework module provides additional utilities for building web applications:\n\n```zig\nconst framework = @import(\"framework\");\n\n// Initialize router\nvar router = try framework.Router.init(allocator);\ndefer router.deinit();\n\n// Add routes\ntry router.get(\"/\", handleRoot);\ntry router.post(\"/api/data\", handleData);\n```\n\n## Performance\n\nThe server is designed for high performance:\n- Multi-threaded architecture utilizing all available CPU cores\n- Keep-alive connection support\n- Efficient WebSocket implementation\n- Integration with SPICE for parallel computing tasks\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensvm%2Fzup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopensvm%2Fzup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensvm%2Fzup/lists"}