{"id":35114555,"url":"https://github.com/ryanfowler/rfc9839-rs","last_synced_at":"2026-04-09T14:02:38.709Z","repository":{"id":314005795,"uuid":"1043310339","full_name":"ryanfowler/rfc9839-rs","owner":"ryanfowler","description":"Validation of RFC 9839 Unicode subsets in Rust.","archived":false,"fork":false,"pushed_at":"2025-09-09T23:10:45.000Z","size":14,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-29T17:43:35.529Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryanfowler.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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-23T15:30:28.000Z","updated_at":"2025-09-09T23:10:48.000Z","dependencies_parsed_at":"2025-09-10T02:50:43.224Z","dependency_job_id":"74475726-54cc-4067-a163-4556c089df75","html_url":"https://github.com/ryanfowler/rfc9839-rs","commit_stats":null,"previous_names":["ryanfowler/rfc9839-rs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ryanfowler/rfc9839-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfowler%2Frfc9839-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfowler%2Frfc9839-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfowler%2Frfc9839-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfowler%2Frfc9839-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanfowler","download_url":"https://codeload.github.com/ryanfowler/rfc9839-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfowler%2Frfc9839-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28124757,"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-12-30T02:00:05.476Z","response_time":64,"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":"2025-12-27T20:39:30.130Z","updated_at":"2025-12-30T08:04:12.842Z","avatar_url":"https://github.com/ryanfowler.png","language":"Rust","readme":"# rfc9839\n\n[![Crates.io](https://img.shields.io/crates/v/rfc9839.svg)](https://crates.io/crates/rfc9839)\n[![Docs.rs](https://docs.rs/rfc9839/badge.svg)](https://docs.rs/rfc9839)\n[![License](https://img.shields.io/crates/l/rfc9839.svg)](#license)\n\nValidation of [RFC 9839](https://www.rfc-editor.org/rfc/rfc9839) Unicode subsets in Rust.\n\nRFC 9839 defines three nested subsets of Unicode characters for use in text protocols:\n\n- **Unicode Scalars** – all code points except UTF-16 surrogates.\n  *Every Rust `char` is already a scalar value; checks are included for completeness and for raw byte validation.*\n- **XML Characters** – `{ TAB, LF, CR } ∪ [0x20–0xD7FF] ∪ [0xE000–0xFFFD] ∪ [0x10000–0x10FFFF]`.\n  *This is the XML “Char” production with legacy controls and noncharacters excluded.*\n- **Unicode Assignables** – “not problematic” characters: useful controls, printable ASCII (excluding DEL/C1),\n  and all assigned scalars minus standardized noncharacters (…FFFE/FFFF in each plane and U+FDD0–FDEF).\n\n---\n\n## Features\n\n- **Character-level APIs**: `is_unicode_scalar_char`, `is_xml_char`, `is_unicode_assignable_char`\n- **String-level APIs**: `is_unicode_scalar`, `is_xml_chars`, `is_unicode_assignable`\n- **Byte-level APIs**: `is_unicode_scalar_bytes`, `is_xml_chars_bytes`, `is_unicode_assignable_bytes`\n- **ASCII fast-path**: tight loops for ASCII data, falling back to `chars()` only after the first non-ASCII byte\n- **Zero allocations**, no lookup tables\n\n## Example\n\n```rust\nuse rfc9839::*;\n\n// Scalars (always true for safe Rust strings)\nassert!(is_unicode_scalar(\"hello 🌍\"));\n\n// XML Characters\nassert!(is_xml_chars(\"ok\\tline\\n\"));\nassert!(!is_xml_chars(\"\\u{0000}\")); // NUL is disallowed\n\n// Unicode Assignables\nassert!(is_unicode_assignable(\"emoji 👍\"));\nassert!(!is_unicode_assignable(\"\\u{007F}\")); // DEL is excluded\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanfowler%2Frfc9839-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanfowler%2Frfc9839-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanfowler%2Frfc9839-rs/lists"}