{"id":22785877,"url":"https://github.com/simonwaldherr/wasio","last_synced_at":"2025-03-30T15:40:20.629Z","repository":{"id":261670659,"uuid":"884922110","full_name":"SimonWaldherr/WASIO","owner":"SimonWaldherr","description":"a WASM hoster, like Apache but for WebAssembly-files","archived":false,"fork":false,"pushed_at":"2024-11-07T19:26:44.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T23:51:31.901Z","etag":null,"topics":["golang","http-server","server","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Go","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/SimonWaldherr.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":"2024-11-07T16:17:53.000Z","updated_at":"2024-11-07T19:26:48.000Z","dependencies_parsed_at":"2024-11-07T20:29:45.281Z","dependency_job_id":null,"html_url":"https://github.com/SimonWaldherr/WASIO","commit_stats":null,"previous_names":["simonwaldherr/wasio"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonWaldherr%2FWASIO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonWaldherr%2FWASIO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonWaldherr%2FWASIO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonWaldherr%2FWASIO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SimonWaldherr","download_url":"https://codeload.github.com/SimonWaldherr/WASIO/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246342674,"owners_count":20761938,"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":["golang","http-server","server","webassembly"],"created_at":"2024-12-11T23:08:16.413Z","updated_at":"2025-03-30T15:40:20.553Z","avatar_url":"https://github.com/SimonWaldherr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WASIO - WebAssembly System Interface Orchestrator\n\nWASIO (WebAssembly System Interface Orchestrator) is a Go-based server for dynamically loading, executing, and managing WebAssembly (WASM) instruments in response to HTTP requests. WASIO is designed to handle structured data transfer, caching, and controlled file system access, making it ideal for applications that need isolated, efficient, and secure compute environments.  \n\nBut it is currently not production ready!  \n\n## Features\n\n- **Dynamic Routing**: Map HTTP endpoints to specific WASM instruments through a configuration file.\n- **Advanced IPC**: Structured JSON-based data transfer allows complex parameter handling and efficient interaction with WASM modules.\n- **File System Access**: Configurable, controlled access to server directories, enabling instruments to read/write files.\n- **Caching**: Built-in response caching with configurable TTLs for optimized performance.\n- **Flexible Configuration**: Define port, routes, caching options, and file system mounts in a single JSON file.\n\n## Getting Started\n\n### Prerequisites\n\n- **Go**: Version 1.20 or higher.\n- **TinyGo**: Required to compile Go-based WASM instruments.\n- **Wazero**: WASM runtime integrated into WASIO for executing instruments.\n\n### Quick Setup\n\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/SimonWaldherr/WASIO.git\n   cd WASIO\n   ```\n\n2. **Build the Instruments**:\n   Compile your WASM instruments with TinyGo, or use the included `build.sh` script to compile all `.go` files in the `instruments` folder.\n\n   ```bash\n   ./build.sh\n   ```\n\n3. **Configure WASIO**:\n   Edit `config.json` to define routes, cache settings, and any filesystem mounts needed by the instruments.\n\n   Example `config.json`:\n   ```json\n   {\n     \"port\": \"8080\",\n     \"cache_ttl\": 300,\n     \"routes\": {\n       \"/hello_world\": {\n         \"wasm_file\": \"instruments/hello_world.wasm\",\n         \"cache\": true,\n         \"ttl\": 600\n       },\n       \"/file_processor\": {\n         \"wasm_file\": \"instruments/file_processor.wasm\",\n         \"cache\": false,\n         \"filesystem\": {\n           \"mount\": \"/data\",\n           \"path\": \"./data\"\n         }\n       }\n     }\n   }\n   ```\n\n4. **Run WASIO**:\n   ```bash\n   go run main.go\n   ```\n\n   WASIO will start and listen for HTTP requests on the configured port.\n\n### Example Requests\n\n1. **Hello World**:\n   ```bash\n   curl \"http://localhost:8080/hello_world?name=Alice\"\n   ```\n\n2. **File Processor**:\n   ```bash\n   curl \"http://localhost:8080/file_processor\"\n   ```\n\n## Contributing\n\nContributions are welcome! Please fork the repository, create a branch, and submit a pull request for any improvements or bug fixes.\n\n## License\n\nWASIO is open-source and available under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonwaldherr%2Fwasio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonwaldherr%2Fwasio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonwaldherr%2Fwasio/lists"}