Skip to content

Nameguard is a fast, language-agnostic validation engine for checking invalid, reserved, or disallowed names using curated datasets and structured rules

Notifications You must be signed in to change notification settings

arx-suite/nameguard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arx - NameGuard

Nameguard is a fast, language-agnostic validation engine for checking invalid, reserved, or disallowed names using curated datasets and structured rules

  • Typical use cases include:
    • subdomain and DNS label checks
    • locale and timezone validation
    • reserved keyword enforcement

Key Features

  • Extremely fast lookups

    • O(1) validation using compile-time generated data
    • zero heap allocations during validation
  • Data-driven

    • curated datasets for:
      • locales
      • timezones
      • reserved subdomains / identifiers
    • data is compiled into the binary (no runtime parsing)
  • Pattern-aware validation

    • structural rules (DNS labels, identifiers)
    • prefix / suffix constraints
    • regex only when unavoidable
  • Language-agnostic core

    • Rust core with a stable C ABI
    • bindings currently available for TypeScript
    • designed for future ports (Go, Ruby, Python, etc.)
  • Safe by default

    • explicit validation results
    • no panics, no exceptions across FFI boundaries

Performance

  • Nameguard is optimized for hot paths:

    • perfect hash sets (PHF)
    • branch-predictable logic
    • no heap allocations during validation
    • no runtime data loading
  • This makes it suitable for:

    • API gateways
    • auth systems
    • domain / username registration
    • security-sensitive validation layers

About

Nameguard is a fast, language-agnostic validation engine for checking invalid, reserved, or disallowed names using curated datasets and structured rules

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages