{"id":21356771,"url":"https://github.com/rousan/sendify-rs","last_synced_at":"2025-09-11T17:22:54.301Z","repository":{"id":57666601,"uuid":"266439417","full_name":"rousan/sendify-rs","owner":"rousan","description":"An unsafe crate to wrap a reference to make it Send + Sync to be able to transfer it between threads","archived":false,"fork":false,"pushed_at":"2020-05-24T09:12:21.000Z","size":23,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-09T12:11:54.244Z","etag":null,"topics":["reference","rust","send","sync","unsafe"],"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/rousan.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":"2020-05-23T23:55:35.000Z","updated_at":"2020-07-01T17:34:00.000Z","dependencies_parsed_at":"2022-09-26T20:31:51.232Z","dependency_job_id":null,"html_url":"https://github.com/rousan/sendify-rs","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/rousan/sendify-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rousan%2Fsendify-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rousan%2Fsendify-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rousan%2Fsendify-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rousan%2Fsendify-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rousan","download_url":"https://codeload.github.com/rousan/sendify-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rousan%2Fsendify-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265075544,"owners_count":23707510,"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":["reference","rust","send","sync","unsafe"],"created_at":"2024-11-22T04:36:08.250Z","updated_at":"2025-07-13T00:31:36.892Z","avatar_url":"https://github.com/rousan.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Github Actions Status](https://github.com/rousan/sendify-rs/workflows/Test/badge.svg)](https://github.com/rousan/sendify-rs/actions)\n[![crates.io](https://img.shields.io/crates/v/sendify.svg)](https://crates.io/crates/sendify)\n[![Documentation](https://docs.rs/sendify/badge.svg)](https://docs.rs/sendify)\n[![MIT](https://img.shields.io/crates/l/sendify.svg)](./LICENSE)\n\n# sendify-rs\n\nAn unsafe crate to wrap a reference to make it [`Send`](https://doc.rust-lang.org/nightly/core/marker/trait.Send.html) + [`Sync`](https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html) to be able to transfer it between threads. Make sure the reference is still valid when unwrapping it.\n\n[Docs](https://docs.rs/sendify)\n\n## Install\n\nAdd this to your `Cargo.toml` file:\n\n```toml\n[dependencies]\nsendify = \"1.1\"\n```\n\n## Example\n \n```rust\nuse std::thread;\n\nfn main() {\n    let data = \"my string\".to_owned();\n\n    let ref_val = \u0026data;\n    // Wrap the reference to make it Send + Sync.\n    let sendify_val = sendify::wrap(ref_val);\n\n    thread::spawn(move || {\n        // Unwrap the reference, here make sure that reference is still valid otherwise\n        // the app might crash.\n        let ref_val = unsafe { sendify_val.unwrap() };\n        assert_eq!(ref_val, \"my string\")\n    })\n    .join()\n    .unwrap();\n\n    assert_eq!(data, \"my string\")\n}\n```\n\n## Contributing\n\nYour PRs and suggestions are always welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frousan%2Fsendify-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frousan%2Fsendify-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frousan%2Fsendify-rs/lists"}