{"id":43805220,"url":"https://github.com/jakobhellermann/libfunnel-rs","last_synced_at":"2026-02-05T22:33:34.126Z","repository":{"id":335919642,"uuid":"1147463048","full_name":"jakobhellermann/libfunnel-rs","owner":"jakobhellermann","description":"Rust bindings for libfunnel: Easy app-to-app frame sharing using PipeWire","archived":false,"fork":false,"pushed_at":"2026-02-01T21:43:06.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-02T04:43:18.615Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jakobhellermann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-02-01T19:30:32.000Z","updated_at":"2026-02-01T21:43:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jakobhellermann/libfunnel-rs","commit_stats":null,"previous_names":["jakobhellermann/libfunnel-rs"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/jakobhellermann/libfunnel-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakobhellermann%2Flibfunnel-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakobhellermann%2Flibfunnel-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakobhellermann%2Flibfunnel-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakobhellermann%2Flibfunnel-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jakobhellermann","download_url":"https://codeload.github.com/jakobhellermann/libfunnel-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakobhellermann%2Flibfunnel-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29136789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T21:59:57.939Z","status":"ssl_error","status_checked_at":"2026-02-05T21:59:57.628Z","response_time":65,"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-02-05T22:33:34.043Z","updated_at":"2026-02-05T22:33:34.116Z","avatar_url":"https://github.com/jakobhellermann.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libfunnel-rs\n\nRust bindings for [libfunnel](https://github.com/hoshinolina/libfunnel) - a library to make creating PipeWire video streams easy, using zero-copy DMA-BUF frame sharing. \"Spout2 / Syphon, but for Linux\".\n\n## Status\n\n- [x] Bindings for the core `libfunnel` API\n- [x] Bindings for the vulkan integration\n- [ ] Bindings for the egl integration\n- [ ] Bindings for the gbm integration\n- [x] [Example](./examples/vk_ash.rs) using [ash](https://docs.rs/ash)\n- [ ] Example using [wgpu](https://docs.rs/wgpu) (requires explicit wait semaphores)\n\n## Documentation\n\nSee [libfunnel Documentation](https://libfunnel.readthedocs.io/en/latest/) for the upstream docs. The documentation for the bindings are available on [docs.rs](https://docs.rs/libfunnel).\n\nSpecifically the [`funnel_mode`](https://libfunnel.readthedocs.io/en/latest/funnel_8h.html#a302307074c18579ebd57b9088f76c4c7) and [Buffer synchronization guide](https://libfunnel.readthedocs.io/en/latest/buffersync.html) pages are very helpful to read.\n\n## Installation\n\nRun `cargo add libfunnel` to add it to your `Cargo.toml`.\n\n```toml\n[dependencies]\nlibfunnel = \"0.1.0\"\n```\n\nYou'll also need the C libfunnel library installed on your system.\n\n## Usages\n\nHere's an rough outline of how you would integrate this library into the draw loop of a vulkan app. A fully working example can be found in [./examples](./examples).\n\n```rust\nuse libfunnel::*;\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    // Create funnel context and stream\n    let ctx = FunnelContext::new()?;\n    let mut stream = ctx.create_stream(c\"MyStream\")?;\n\n    // Initialize Vulkan integration\n    unsafe {\n        stream.init_vulkan(vk_instance, vk_physical_device, vk_device)?;\n    }\n    stream.vk_set_usage(VK_IMAGE_USAGE_TRANSFER_DST_BIT)?;\n    stream.vk_add_format(VK_FORMAT_B8G8R8A8_SRGB, true, VK_FORMAT_FEATURE_BLIT_DST_BIT)?;\n\n    // Configure stream\n    stream.set_size(1920, 1080)?;\n    stream.set_mode(funnel_mode::FUNNEL_ASYNC)?;\n    stream.set_rate(funnel_fraction::VARIABLE, 1.into(), 144.into())?;\n    stream.configure()?;\n    stream.start()?;\n\n    // Render loop\n    loop {\n        // Try to get a funnel buffer to stream the frame\n        let mut funnel_buffer = stream.dequeue()?;\n\n        // Render your application...\n\n        // If we have a funnel buffer, copy to it\n        if let Some(buffer) = \u0026mut funnel_buffer {\n            let vk_image = buffer.vk_get_image()?;\n            let (acquire_sema, release_sema) = unsafe { buffer.vk_get_semaphores()? };\n            let fence = unsafe { buffer.vk_get_fence()? };\n\n            // Submit GPU commands with synchronization:\n            //   wait_semaphores: [..., acquire_sema]\n            //   signal_semaphores: [..., release_sema]\n            //   fence: fence\n        }\n\n        // Enqueue buffer back to stream for PipeWire to send\n        if let Some(buffer) = funnel_buffer {\n            unsafe { stream.enqueue(buffer)?; }\n        }\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakobhellermann%2Flibfunnel-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakobhellermann%2Flibfunnel-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakobhellermann%2Flibfunnel-rs/lists"}