{"id":17315332,"url":"https://github.com/frando/async-osc","last_synced_at":"2025-04-14T14:20:27.679Z","repository":{"id":62438245,"uuid":"340683673","full_name":"Frando/async-osc","owner":"Frando","description":"Async Rust library for the Open Sound Control (OSC) protocol","archived":false,"fork":false,"pushed_at":"2021-02-20T15:29:20.000Z","size":19,"stargazers_count":21,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T03:14:47.486Z","etag":null,"topics":["async-std","open-sound-control","osc","rust"],"latest_commit_sha":null,"homepage":"","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/Frando.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-20T15:13:09.000Z","updated_at":"2025-02-25T19:11:36.000Z","dependencies_parsed_at":"2022-11-01T21:51:27.293Z","dependency_job_id":null,"html_url":"https://github.com/Frando/async-osc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frando%2Fasync-osc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frando%2Fasync-osc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frando%2Fasync-osc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frando%2Fasync-osc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Frando","download_url":"https://codeload.github.com/Frando/async-osc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248894939,"owners_count":21179154,"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":["async-std","open-sound-control","osc","rust"],"created_at":"2024-10-15T13:07:41.463Z","updated_at":"2025-04-14T14:20:27.648Z","avatar_url":"https://github.com/Frando.png","language":"Rust","readme":"\u003ch1 align=\"center\"\u003easync-osc\u003c/h1\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cstrong\u003e\n    Async Rust library for the Open Sound Control (OSC) protocol\n  \u003c/strong\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003c!-- Crates version --\u003e\n  \u003ca href=\"https://crates.io/crates/async-osc\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/v/async-osc.svg?style=flat-square\"\n    alt=\"Crates.io version\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- Downloads --\u003e\n  \u003ca href=\"https://crates.io/crates/async-osc\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/d/async-osc.svg?style=flat-square\"\n      alt=\"Download\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- docs.rs docs --\u003e\n  \u003ca href=\"https://docs.rs/async-osc\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square\"\n      alt=\"docs.rs docs\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3\u003e\n    \u003ca href=\"https://docs.rs/async-osc\"\u003e\n      API Docs\n    \u003c/a\u003e\n    \u003cspan\u003e | \u003c/span\u003e\n    \u003ca href=\"https://github.com/Frando/async-osc/releases\"\u003e\n      Releases\n    \u003c/a\u003e\n    \u003cspan\u003e | \u003c/span\u003e\n    \u003ca href=\"https://github.com/Frando/async-osc/blob/master.github/CONTRIBUTING.md\"\u003e\n      Contributing\n    \u003c/a\u003e\n  \u003c/h3\u003e\n\u003c/div\u003e\n\nThis crate implements an async interface on the [OSC 1.0](https://web.archive.org/web/20201211193930/http://opensoundcontrol.org/spec-1_0) protocol. It uses [`async-std`](https://docs.rs/async-std) for async networking and [`rosc`](https://docs.rs/rosc) for OSC encoding and decoding.\n\n## Installation\n```sh\n$ cargo add async-osc\n```\n\n## Example\n```rust\nuse async_osc::{prelude::*, Error, OscPacket, OscSocket, OscType, Result};\nuse async_std::stream::StreamExt;\n\n#[async_std::main]\nasync fn main() -\u003e Result\u003c()\u003e {\n    let mut socket = OscSocket::bind(\"localhost:5050\").await?;\n\n    // Open a second socket to send a test message.\n    async_std::task::spawn(async move {\n        let socket = OscSocket::bind(\"localhost:0\").await?;\n        socket.connect(\"localhost:5050\").await?;\n        socket\n            .send((\"/volume\", (0.9f32, \"foo\".to_string())))\n            .await?;\n        Ok::\u003c(), Error\u003e(())\n    });\n\n    // Listen for incoming packets on the first socket.\n    while let Some(packet) = socket.next().await {\n        let (packet, peer_addr) = packet?;\n        eprintln!(\"Receive from {}: {:?}\", peer_addr, packet);\n        match packet {\n            OscPacket::Bundle(_) =\u003e {}\n            OscPacket::Message(message) =\u003e match \u0026message.as_tuple() {\n                (\"/volume\", \u0026[OscType::Float(vol), OscType::String(ref s)]) =\u003e {\n                    eprintln!(\"Set volume: {} {}\", vol, s);\n                }\n                _ =\u003e {}\n            },\n        }\n    }\n    Ok(())\n}\n```\n\n## Safety\nThis crate uses ``#![deny(unsafe_code)]`` to ensure everything is implemented in\n100% Safe Rust.\n\n## Contributing\nWant to join us? Check out our [\"Contributing\" guide][contributing] and take a\nlook at some of these issues:\n\n- [Issues labeled \"good first issue\"][good-first-issue]\n- [Issues labeled \"help wanted\"][help-wanted]\n\n[contributing]: https://github.com/Frando/async-osc/blob/master.github/CONTRIBUTING.md\n[good-first-issue]: https://github.com/Frando/async-osc/labels/good%20first%20issue\n[help-wanted]: https://github.com/Frando/async-osc/labels/help%20wanted\n\n## License\n\n\u003csup\u003e\nLicensed under either of \u003ca href=\"LICENSE-APACHE\"\u003eApache License, Version\n2.0\u003c/a\u003e or \u003ca href=\"LICENSE-MIT\"\u003eMIT license\u003c/a\u003e at your option.\n\u003c/sup\u003e\n\n\u003cbr/\u003e\n\n\u003csub\u003e\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this crate by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n\u003c/sub\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrando%2Fasync-osc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrando%2Fasync-osc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrando%2Fasync-osc/lists"}