{"id":47936610,"url":"https://github.com/tangle-network/microvm-blueprint","last_synced_at":"2026-04-04T07:44:29.543Z","repository":{"id":341715923,"uuid":"1171156204","full_name":"tangle-network/microvm-blueprint","owner":"tangle-network","description":"Infrastructure-layer microVM lifecycle blueprint for Tangle","archived":false,"fork":false,"pushed_at":"2026-03-03T21:31:31.000Z","size":94,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-11T09:10:26.645Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tangle-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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-03-02T23:41:43.000Z","updated_at":"2026-03-03T21:31:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tangle-network/microvm-blueprint","commit_stats":null,"previous_names":["tangle-network/microvm-blueprint"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tangle-network/microvm-blueprint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fmicrovm-blueprint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fmicrovm-blueprint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fmicrovm-blueprint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fmicrovm-blueprint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tangle-network","download_url":"https://codeload.github.com/tangle-network/microvm-blueprint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fmicrovm-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":"2026-04-04T07:44:28.888Z","updated_at":"2026-04-04T07:44:29.513Z","avatar_url":"https://github.com/tangle-network.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Tangle Network Banner](https://raw.githubusercontent.com/tangle-network/tangle/refs/heads/main/assets/Tangle%20%20Banner.png)\n\n# microvm-blueprint\n\n[![Discord](https://img.shields.io/badge/Discord-Join%20Chat-7289da?logo=discord\u0026logoColor=white)](https://discord.gg/cv8EfJu3Tn)\n[![Twitter](https://img.shields.io/twitter/follow/tangle_network?style=social)](https://twitter.com/tangle_network)\n\nInfrastructure-layer blueprint for microVM lifecycle orchestration on Tangle, built with [blueprint-sdk](https://github.com/tangle-network/blueprint).\n\n## Workspace\n\n- `microvm-runtime`: infrastructure runtime contracts and provider adapters (`VmProvider`/`VmQuery`), including in-memory and Firecracker adapter surfaces.\n- `microvm-blueprint-lib`: reusable blueprint job/query wiring that consumes `microvm-runtime` contracts.\n- `microvm-blueprint-bin`: runnable binary wiring the `BlueprintRunner` with Tangle producer/consumer and a read-only query background service.\n\n## Lifecycle jobs (state-changing only)\n\nOn-chain job functions dispatched through blueprint-sdk's `Router` with `TangleLayer`:\n\n| Job ID | Function | Description |\n|--------|----------|-------------|\n| 0 | `create_vm` | Provision a new microVM |\n| 1 | `start_vm` | Start a stopped/created microVM |\n| 2 | `stop_vm` | Stop a running microVM |\n| 3 | `snapshot_vm` | Capture microVM state |\n| 4 | `destroy_vm` | Tear down a microVM |\n\nJob arguments are ABI-decoded from Tangle calldata via `TangleArg`; results are ABI-encoded back via `TangleResult`.\n\n## Query surfaces (read-only only)\n\nRead-only HTTP endpoints run as a `BackgroundService` alongside the `BlueprintRunner`:\n\n- `GET /health`\n- `GET /vms`\n- `GET /vms/{vm_id}`\n- `GET /vms/{vm_id}/snapshots`\n\nNo state-changing operations are exposed as HTTP endpoints.\n\n## Run\n\n```bash\ncargo run -p microvm-blueprint-bin\n```\n\nThe binary requires a Tangle environment configuration (see `BlueprintEnvironment::load()`).\nProvider selection is controlled by `MICROVM_PROVIDER`:\n- `in-memory` (default)\n- `firecracker` (requires `--features firecracker`)\n\nFirecracker provider expects host paths (override via env as needed):\n- `MICROVM_FIRECRACKER_BIN`\n- `MICROVM_FIRECRACKER_KERNEL`\n- `MICROVM_FIRECRACKER_ROOTFS`\n\n## Validate\n\n```bash\ncargo check\ncargo test --all\n```\n\n## Incremental engineering workflow\n\n- Main branch remains stable; all feature work lands via short-lived branches.\n- Keep job/query boundaries strict: state changes in jobs, reads via query surfaces.\n- Every change should include tests or explicit rationale when tests are not yet applicable.\n- Prefer small, reviewable PRs with one architectural concern each.\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for branch, commit, and PR conventions.\n\n## References\n\nThis blueprint's structure and wiring patterns were derived from:\n\n| Source | What was referenced |\n|--------|---------------------|\n| [`blueprint`](https://github.com/tangle-network/blueprint) SDK `examples/incredible-squaring/` | Crate layout (`-lib`/`-bin`), `Router` + `TangleLayer` wiring, `#[debug_job]` macro, `TangleArg`/`TangleResult` extractors, `BackgroundService` trait, `BlueprintRunner::builder()` pattern |\n| [`ai-agent-sandbox-blueprint`](https://github.com/user/ai-agent-sandbox-blueprint) | Job ID constants as `u8`, `router()` export pattern, background HTTP API alongside runner, `BlueprintEnvironment::load()` / `TangleProducer` / `TangleConsumer` wiring |\n| [`ai-trading-blueprints`](https://github.com/user/ai-trading-blueprints) | Multi-crate workspace conventions, job function signatures with `Result\u003cTangleResult\u003cT\u003e, String\u003e` error pattern, provider trait separation |\n\nCanonical file paths inspected:\n- `/home/drew/code/blueprint/examples/incredible-squaring/incredible-squaring-lib/src/lib.rs`\n- `/home/drew/code/blueprint/examples/incredible-squaring/incredible-squaring-bin/src/main.rs`\n- `/home/drew/code/ai-agent-sandbox-blueprint/ai-agent-sandbox-blueprint-lib/src/lib.rs`\n- `/home/drew/code/ai-agent-sandbox-blueprint/ai-agent-sandbox-blueprint-bin/src/main.rs`\n- `/home/drew/code/ai-trading-blueprints/trading-blueprint-lib/src/lib.rs`\n- `/home/drew/code/ai-trading-blueprints/trading-blueprint-bin/src/main.rs`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Fmicrovm-blueprint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftangle-network%2Fmicrovm-blueprint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Fmicrovm-blueprint/lists"}