{"id":21233660,"url":"https://github.com/bdr-pro/primeshorrustpackage","last_synced_at":"2025-10-12T11:43:10.737Z","repository":{"id":222343943,"uuid":"757005033","full_name":"BDR-Pro/PrimeShorRustPackage","owner":"BDR-Pro","description":"We're here to make prime checking and factorization not just fast, but also fun.","archived":false,"fork":false,"pushed_at":"2024-03-17T14:19:53.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T06:19:06.312Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://crates.io/crates/primeshor","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/BDR-Pro.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-13T18:10:19.000Z","updated_at":"2024-02-13T18:29:43.000Z","dependencies_parsed_at":"2024-02-13T18:30:35.941Z","dependency_job_id":"ee382cfe-f3bf-412e-a566-bf70d4eb2014","html_url":"https://github.com/BDR-Pro/PrimeShorRustPackage","commit_stats":null,"previous_names":["bdr-pro/primeshorrustpackage"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BDR-Pro%2FPrimeShorRustPackage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BDR-Pro%2FPrimeShorRustPackage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BDR-Pro%2FPrimeShorRustPackage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BDR-Pro%2FPrimeShorRustPackage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BDR-Pro","download_url":"https://codeload.github.com/BDR-Pro/PrimeShorRustPackage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243676707,"owners_count":20329432,"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":[],"created_at":"2024-11-20T23:59:50.871Z","updated_at":"2025-10-12T11:43:05.699Z","avatar_url":"https://github.com/BDR-Pro.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `primeshor`\n\n🚀 Welcome to the *coolest* Rust project on the block, `primeshor`! This isn't your grandpa's number-crunching library. We're here to make prime checking and factorization not just fast, but also *fun*.\n\n`But wait, what's so fun about prime numbers?\"`you ask. Well, we're here to show you that prime numbers are more than just the building blocks of cryptography. They're the superheroes of the number world, and we're here to celebrate them in all their glory.\n\n## Updated `0.2.0` to handle 🚀 `BigUint` for massive numbers by parsing from a string, ensuring it's set for operations beyond usual integer bounds! ✨\n\n## Quick Start\n\nWant to dive straight into the action? Here's how you get the party started:\n\n```rust\nuse num_bigint::BigUint;\nuse primeshor::{factorize, is_prime};\n\nfn main() {\n    // Define the number as a string\n    let n_str = \"123456765343222456657333226789\";\n    // Convert the string to a BigUint\n    let n = BigUint::parse_bytes(n_str.as_bytes(), 10).unwrap();\n\n    match factorize(n.clone()) {\n        Ok((factor1, factor2)) =\u003e println!(\"Factors of {}: {}, {}\", n.clone(), factor1, factor2),\n        Err(e) =\u003e println!(\"Error: {}\", e),\n    }\n\n    if is_prime(n.clone()) {\n        println!(\"{} is prime\", n.clone());\n    } else {\n        println!(\"{} is not prime\", n.clone());\n    }\n}\n```\n\nRun this snippet, and you'll be greeted with:\n\n```bash\n\nFactors of 123456765343222456657333226789: 3529, 34983498255376156604514941\n123456765343222456657333226789 is not prime\n\n```\n\n## What's Shor's Algorithm?\n\nNow, let's get a tiny bit *nerdy*. Ever heard of Shor's Algorithm? It's like the superhero of algorithms when it comes to breaking down numbers into their prime factors. 🦸‍♂️\n\nShor's Algorithm is a quantum computing algorithm for integer factorization. Translated into Gen Z speak: it's a super-fast way to find out what numbers multiply together to make your original number, but it uses qubits instead of bits, making it kinda like your quantum BFF for cryptography.\n\n### How Fast Are We Talking?\n\nIn the traditional computing world, factorizing large numbers takes a *long* time (we're talking more than your patience level for sure). But with Shor's Algorithm, you can factorize these massive numbers in polynomial time. That's right, it runs in `O((log n)^2 (log log n) (log log log n))` time, making it exponentially faster than the best-known algorithms running on classical computers.\n\n## Why `primeshor`?\n\nWhile we're not running on quantum computers (yet 😉), `primeshor` aims to bring a bit of that excitement into the Rust ecosystem. Whether you're a math enthusiast, a budding cryptographer, or just here for the quantum revolution, `primeshor` is your go-to library for exploring prime numbers and the wonders of factorization.\n\nSo, clone the repo, dive into the docs, and start experimenting. Who knows? Maybe you'll be the one to simulate Shor's Algorithm on a classical computer (or at least have fun trying).\n\n---\n\nRemember, `primeshor` is all about making the complex simple and the mundane fun. Happy coding! 🎉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdr-pro%2Fprimeshorrustpackage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdr-pro%2Fprimeshorrustpackage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdr-pro%2Fprimeshorrustpackage/lists"}