{"id":19348962,"url":"https://github.com/zlosynth/gazpatcho","last_synced_at":"2025-10-18T20:56:17.678Z","repository":{"id":55407100,"uuid":"277620104","full_name":"zlosynth/gazpatcho","owner":"zlosynth","description":"Simple node-based graph editor for Rust. Register nodes, let the user mingle with them, read the result.","archived":false,"fork":false,"pushed_at":"2021-02-26T15:52:32.000Z","size":439,"stargazers_count":36,"open_issues_count":12,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-27T13:26:37.408Z","etag":null,"topics":[],"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/zlosynth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-07-06T18:34:12.000Z","updated_at":"2025-07-10T03:36:51.000Z","dependencies_parsed_at":"2022-08-14T23:40:36.424Z","dependency_job_id":null,"html_url":"https://github.com/zlosynth/gazpatcho","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zlosynth/gazpatcho","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zlosynth%2Fgazpatcho","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zlosynth%2Fgazpatcho/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zlosynth%2Fgazpatcho/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zlosynth%2Fgazpatcho/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zlosynth","download_url":"https://codeload.github.com/zlosynth/gazpatcho/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zlosynth%2Fgazpatcho/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279617343,"owners_count":26200132,"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","status":"online","status_checked_at":"2025-10-18T02:00:06.492Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-11-10T04:24:00.130Z","updated_at":"2025-10-18T20:56:17.627Z","avatar_url":"https://github.com/zlosynth.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gazpatcho\n\nA Rust library providing a graphical node-based graph editor.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"examples/main.png\" alt=\"Example\" /\u003e\n\u003c/p\u003e\n\nThis library can be used as to draw a user interface, allowing users to model\ngraphs that would be later interpreed and acted upon by the backend of the\napplication.\n\nThere are four main parts of the API:\n\n* `Config` structure defined on the start of the application. This structure\n  specifies all the available node types, their inputs, outputs and widgets\n  taking associated data.\n* `Report` structure which is returned by the running instance of Gazpatcho on\n  every change performed on the graph (added or removed nodes, changed values,\n  added or removed patches). This structure discribes the graph and associated\n  data.\n* `run` function which has two parameters: The `Config` and a closure taking\n  current `Report` as its argument.\n* `Request` enumeration of all operations that can be sent to the running\n  instance of the graph to alter its state.\n\nDocumentation:\n\n* [API reference (docs.rs)](https://docs.rs/gazpatcho)\n* [Repository (github.com)](https://github.com/zlosynth/gazpatcho)\n* [Crate (crates.io)](https://crates.io/crates/gazpatcho)\n\n## Usage\n\nAdd the following to your `Cargo.toml`:\n\n``` toml\n[dependencies]\ngazpatcho = \"1.4\"\n```\n\nThe following code runs an instance of Gazpatcho UI. There will be a single type\nof node available, with one input and one output pin, and with switch that can\nbe set on or off by the user. When the user performs any changes, a new report\nwill be sent to the `run` callback, desribing the current state of the graph. In\na real application, the `dbg!` call would be replaced by something more useful:\n\n``` rust\nuse gazpatcho::config::*;\n\nfn main() {\n    let config = Config {\n        node_templates: vec![\n            NodeTemplate {\n                label: \"Example node\".to_owned(),\n                class: \"example_node\".to_owned(),\n                pins: vec![\n                    Pin {\n                        label: \"Input\".to_owned(),\n                        class: \"in\".to_owned(),\n                        direction: Input,\n                    },\n                    Pin {\n                        label: \"Output\".to_owned(),\n                        class: \"out\".to_owned(),\n                        direction: Output,\n                    },\n                ],\n                widgets: vec![Switch {\n                    label: \"Switch\".to_owned(),\n                    key: \"switch\".to_owned(),\n                }],\n            }\n        ],\n    };\n\n    gazpatcho::run_with_callback(\"Application Name\", config, |report| {\n        // Act upon the current report\n        dbg!(report);\n\n        // Respond with change requests\n        vec![\n            // Request::SetValue { ... }\n        ]\n    });\n}\n```\n\nSee the [documentation](https://docs.rs/gazpatcho) to learn more about the\n`Config` and `Report` structures. If you prefer tinkering with code over reading\ndocumentation, see and try included [examples](examples/):\n\n``` shell\ncargo run --example main\n```\n\n# License\n\nGazpatcho is distributed under the terms of the General Public License\nversion 3. See [LICENSE](LICENSE) for details.\n\n# Changelog\n\nRead the [CHANGELOG.md](CHANGELOG.md) to learn about changes introduced in each\nrelease.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzlosynth%2Fgazpatcho","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzlosynth%2Fgazpatcho","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzlosynth%2Fgazpatcho/lists"}