# src/kidexa/sloppy_number/__init__.py

try:
    # Import the Rust binary we just built
    from _kidexa_fast import parse as rust_parse
except ImportError:
    # Fallback message if compilation failed or platform mismatch
    raise ImportError("Rust extension '_kidexa_fast' not found. Ensure the package is installed correctly.")

def parse(text):
    """
    Parses messy numbers using the high-performance Rust engine.
    Example: $12.5k -> 12500
    """
    return rust_parse(text)