{"id":25242692,"url":"https://github.com/tangle-network/secure-code-execution-blueprint","last_synced_at":"2026-04-04T07:44:29.368Z","repository":{"id":275910624,"uuid":"927585311","full_name":"tangle-network/secure-code-execution-blueprint","owner":"tangle-network","description":"A Tangle Blueprint for running a secure code execution function-as-a-service platform","archived":false,"fork":false,"pushed_at":"2025-10-08T22:17:14.000Z","size":219,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-04T07:44:28.518Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tangle-network.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-05T07:48:32.000Z","updated_at":"2025-03-20T23:11:20.000Z","dependencies_parsed_at":"2025-02-05T08:45:19.593Z","dependency_job_id":null,"html_url":"https://github.com/tangle-network/secure-code-execution-blueprint","commit_stats":null,"previous_names":["tangle-network/secure-code-execution-blueprint"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tangle-network/secure-code-execution-blueprint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fsecure-code-execution-blueprint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fsecure-code-execution-blueprint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fsecure-code-execution-blueprint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fsecure-code-execution-blueprint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tangle-network","download_url":"https://codeload.github.com/tangle-network/secure-code-execution-blueprint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fsecure-code-execution-blueprint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31392186,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-02-12T00:01:07.434Z","updated_at":"2026-04-04T07:44:29.360Z","avatar_url":"https://github.com/tangle-network.png","language":"Rust","readme":"# \u003ch1 align=\"center\"\u003eCode Execution Blueprint for Tangle Network 🚀\u003c/h1\u003e\n\n## 📚 Overview\n\nThis Tangle Blueprint provides a secure code execution service that runs arbitrary code snippets in a Trusted Execution Environment (TEE). It supports multiple programming languages and ensures secure isolation through sandboxing and resource limits.\n\nThe service is designed to be:\n\n- 🔒 Secure: Runs code in isolated environments with strict resource limits\n- 🌐 Language-agnostic: Supports multiple programming languages\n- ⚡ Fast: Optimized for quick code execution and response\n- 🛡️ Safe: Leverages TEE for secure code execution\n- 🔄 Scalable: Handles concurrent executions with proper resource management\n\n## 📋 Prerequisites\n\nBefore running this project, ensure you have:\n\n- [Rust](https://www.rust-lang.org/tools/install)\n- [Forge](https://getfoundry.sh)\n- [cargo-tangle](https://crates.io/crates/cargo-tangle)\n\nInstall cargo-tangle:\n\n```bash\ncargo install cargo-tangle --git https://github.com/tangle-network/blueprint.git --force\n```\n\n## 🚀 Quick Start\n\n1. **Build the Project**:\n\n```bash\ncargo build\n```\n\n2. **Run Tests**:\n\n```bash\ncargo test\n```\n\n3. **Deploy the Blueprint**:\n\n```bash\ncargo tangle blueprint deploy\n```\n\n## 💻 Usage\n\n### Execute Code via HTTP API\n\n```bash\ncurl -X POST http://localhost:8080/execute \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"language\": \"python\",\n    \"code\": \"print(\\\"Hello, World!\\\")\",\n    \"input\": null,\n    \"timeout\": 30\n  }'\n```\n\nResponse format:\n\n```json\n{\n  \"stdout\": \"Hello, World!\\n\",\n  \"stderr\": \"\",\n  \"status\": \"success\",\n  \"execution_time\": 123,\n  \"memory_usage\": 1024\n}\n```\n\n### Execute Code via Tangle Network\n\n```rust\nlet result = execute_code(\n    \"python\".to_string(),\n    \"print('Hello from Tangle!')\",\n    None,\n    context\n).await?;\n```\n\n## 🔧 Configuration\n\nThe service can be configured through environment variables:\n\n- `CODE_EXEC_PORT`: HTTP server port (default: 8080)\n- `MAX_CONCURRENT_EXECUTIONS`: Maximum concurrent code executions (default: 10)\n\nResource limits can be customized in `ResourceLimits`:\n\n```rust\nResourceLimits {\n    memory: 256 * 1024 * 1024,  // 256MB\n    cpu_time: 30,               // 30 seconds\n    processes: 32,              // Max 32 processes\n    file_size: 10 * 1024 * 1024, // 10MB\n    disk_space: 100 * 1024 * 1024, // 100MB\n}\n```\n\n## 🏗️ Architecture\n\nThe blueprint consists of several key components:\n\n1. **CodeExecutionService**: Core service managing code execution\n2. **Sandbox**: Isolated environment for secure code execution\n3. **Language Executors**: Language-specific execution implementations\n4. **HTTP Server**: RESTful API for code execution requests\n5. **Resource Monitor**: Tracks and limits resource usage\n\n## 📜 License\n\nLicensed under either of:\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE))\n- MIT license ([LICENSE-MIT](LICENSE-MIT))\n","funding_links":[],"categories":["Web Services"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Fsecure-code-execution-blueprint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftangle-network%2Fsecure-code-execution-blueprint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Fsecure-code-execution-blueprint/lists"}