{"id":14967147,"url":"https://github.com/golemfactory/gwasm-rust-api","last_synced_at":"2025-10-19T09:31:36.749Z","repository":{"id":62439892,"uuid":"203590791","full_name":"golemfactory/gwasm-rust-api","owner":"golemfactory","description":"gWasm API for Rust apps","archived":false,"fork":false,"pushed_at":"2020-05-28T10:40:11.000Z","size":1470,"stargazers_count":2,"open_issues_count":2,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-01T04:29:41.789Z","etag":null,"topics":["gwasm-api","rust-apps"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/golemfactory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-21T13:31:46.000Z","updated_at":"2022-10-27T06:00:04.000Z","dependencies_parsed_at":"2022-11-01T22:15:49.409Z","dependency_job_id":null,"html_url":"https://github.com/golemfactory/gwasm-rust-api","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golemfactory%2Fgwasm-rust-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golemfactory%2Fgwasm-rust-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golemfactory%2Fgwasm-rust-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golemfactory%2Fgwasm-rust-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/golemfactory","download_url":"https://codeload.github.com/golemfactory/gwasm-rust-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219869245,"owners_count":16555571,"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":["gwasm-api","rust-apps"],"created_at":"2024-09-24T13:37:31.607Z","updated_at":"2025-10-19T09:31:36.284Z","avatar_url":"https://github.com/golemfactory.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e\u003ccode\u003egwasm-api\u003c/code\u003e\u003c/h1\u003e\n\n  \u003cp\u003e\n    \u003cstrong\u003eA Rust library for interfacing your native apps with gWasm.\u003c/strong\u003e\n  \u003c/p\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"https://github.com/golemfactory/gwasm-rust-api/actions\"\u003e\u003cimg src=\"https://github.com/golemfactory/gwasm-rust-api/workflows/Continuous%20Integration/badge.svg\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/gwasm-api\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/gwasm-api.svg?style=flat-square\" alt=\"Crates.io version\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/gwasm-api\"\u003e\u003cimg src=\"https://img.shields.io/crates/d/gwasm-api.svg?style=flat-square\" alt=\"Download\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://docs.rs/gwasm-api/\"\u003e\u003cimg src=\"https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square\" alt=\"docs.rs docs\" /\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\n  \u003ch3\u003e\n    \u003ca href=\"https://golemfactory.github.io/gwasm-rust-api/\"\u003eGuide\u003c/a\u003e \n  \u003c/h3\u003e\n\u003c/div\u003e\n\n[gWasm](https://docs.golem.network/#/Products/Brass-Beta/gWASM) is Golem's new\nmeta use-case which allows Golem's developers/users to deploy their Wasm apps\non Golem Network. This API providers convenience structures and functions for\ncreating a gWasm task and connecting with Golem Network all from native Rust code.\n\n```toml\n# Cargo.toml\ngwasm-api = \"0.3\"\n```\n\n## Example\n\n```rust\nuse gwasm_api::prelude::*;\nuse anyhow::Result;\nuse std::path::PathBuf;\n\nstruct ProgressTracker;\n\nimpl ProgressUpdate for ProgressTracker {\n    fn update(\u0026self, progress: f64) {\n        println!(\"Current progress = {}\", progress);\n    }\n}\n\nfn main() -\u003e Result\u003c()\u003e {\n    let binary = GWasmBinary {\n        js: \u0026[0u8; 100],   // JavaScript file generated by Emscripten\n        wasm: \u0026[0u8; 100], // Wasm binary generated by Emscripten\n    };\n    let task = TaskBuilder::try_new(\"workspace\", binary)?\n        .push_subtask_data(vec![0u8; 100])\n        .build()?;\n    let computed_task = compute(\n        PathBuf::from(\"datadir\"),\n        \"127.0.0.1\".to_string(),\n        61000,\n        Net::TestNet,\n        task,\n        ProgressTracker,\n    )?;\n\n    for subtask in computed_task.subtasks {\n        for (_, reader) in subtask.data {\n            assert!(!reader.buffer().is_empty());\n        }\n    }\n\n    Ok(())\n}\n```\n\n## More examples\n* [g-flite](https://github.com/golemfactory/g-flite) is a CLI which uses `gwasm-api`\n  internally\n\n## License\nLicensed under [GPLv3](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolemfactory%2Fgwasm-rust-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgolemfactory%2Fgwasm-rust-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolemfactory%2Fgwasm-rust-api/lists"}