# gregyjames/fastdate architecture

> Architecture diagram of the GitHub repository gregyjames/fastdate, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gregyjames/fastdate
- Repository: https://github.com/gregyjames/fastdate
- Video tour (about a minute): https://gitdiagram.com/gregyjames/fastdate/video

## Overview

FastDate is a .NET-facing ISO 8601 parser backed by Rust SIMD routines. A caller submits a string or UTF-8 span, or a list for bulk parsing; the C# parser selects the platform native routine, receives a packed date-time, and exposes component and DateTime conversions. Rust exports architecture-specific single, UTF-16, and bulk parsers. README documents Apple ARM64 NEON and Windows/Linux x64 SSE3 support. Relationships shown are limited to calls and dispatch documented or visible in excerpts; unsampled implementation details are omitted.

Main entry points: [`src/FastDate/NativeWrapper.cs`](https://github.com/gregyjames/fastdate/blob/main/src/FastDate/NativeWrapper.cs) (Packed date-time), [`src/FastDate/Library.cs`](https://github.com/gregyjames/fastdate/blob/main/src/FastDate/Library.cs) (Parser API), [`src/fastdatecore/src/lib.rs`](https://github.com/gregyjames/fastdate/blob/main/src/fastdatecore/src/lib.rs) (Rust exports), [`src/fastdatecore/src/neon.rs`](https://github.com/gregyjames/fastdate/blob/main/src/fastdatecore/src/neon.rs) (NEON parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Parsing API"]
  node_parser["Parser API<br/>[Library.cs]"]
  node_bulk["Bulk parsing<br/>[Library.cs]"]
end

subgraph group_interop["Native Interop"]
  node_native["Native bindings<br/>[NativeWrapper.cs]"]
end

subgraph group_simd["SIMD Parsing"]
  node_rust_exports["Rust exports<br/>[lib.rs]"]
  node_neon["NEON parser<br/>[neon.rs]"]
  node_sse["SSE parser<br/>[sse.rs]"]
  node_constants["SIMD constants<br/>[constants.rs]"]
end

subgraph group_results["Packed Results"]
  node_packed["Packed date-time<br/>[NativeWrapper.cs]"]
  node_conversions["Date conversions"]
end

node_caller(("Library caller"))

node_caller -->|"parses dates"| node_parser
node_parser -->|"calls native"| node_native
node_parser -->|"returns packed"| node_packed
node_caller -->|"parses batches"| node_bulk
node_bulk -->|"calls bulk"| node_native
node_native -->|"invokes exports"| node_rust_exports
node_rust_exports -->|"exports ARM"| node_neon
node_rust_exports -->|"exports x86"| node_sse
node_neon -->|"uses constants"| node_constants
node_sse -->|"uses constants"| node_constants
node_neon -->|"produces packed"| node_packed
node_sse -->|"produces packed"| node_packed
node_packed -->|"converts to dates"| node_conversions

click node_parser "https://github.com/gregyjames/fastdate/blob/main/src/FastDate/Library.cs"
click node_bulk "https://github.com/gregyjames/fastdate/blob/main/src/FastDate/Library.cs"
click node_native "https://github.com/gregyjames/fastdate/blob/main/src/FastDate/NativeWrapper.cs"
click node_rust_exports "https://github.com/gregyjames/fastdate/blob/main/src/fastdatecore/src/lib.rs"
click node_neon "https://github.com/gregyjames/fastdate/blob/main/src/fastdatecore/src/neon.rs"
click node_sse "https://github.com/gregyjames/fastdate/blob/main/src/fastdatecore/src/sse.rs"
click node_constants "https://github.com/gregyjames/fastdate/blob/main/src/fastdatecore/src/constants.rs"
click node_packed "https://github.com/gregyjames/fastdate/blob/main/src/FastDate/NativeWrapper.cs"
click node_conversions "https://github.com/gregyjames/fastdate/blob/main/src/FastDate/DateTimeExtensions.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_parser,node_bulk toneBlue
class node_native toneAmber
class node_rust_exports,node_neon,node_sse,node_constants toneMint
class node_packed,node_conversions toneRose
class node_caller toneIndigo
```

## Components

### Parsing API

- [Parser API](https://github.com/gregyjames/fastdate/blob/main/src/FastDate/Library.cs): `src/FastDate/Library.cs`
- [Bulk parsing](https://github.com/gregyjames/fastdate/blob/main/src/FastDate/Library.cs): `src/FastDate/Library.cs`

### Native Interop

- [Native bindings](https://github.com/gregyjames/fastdate/blob/main/src/FastDate/NativeWrapper.cs): `src/FastDate/NativeWrapper.cs`

### SIMD Parsing

- [Rust exports](https://github.com/gregyjames/fastdate/blob/main/src/fastdatecore/src/lib.rs): `src/fastdatecore/src/lib.rs`
- [NEON parser](https://github.com/gregyjames/fastdate/blob/main/src/fastdatecore/src/neon.rs): `src/fastdatecore/src/neon.rs`
- [SSE parser](https://github.com/gregyjames/fastdate/blob/main/src/fastdatecore/src/sse.rs): `src/fastdatecore/src/sse.rs`
- [SIMD constants](https://github.com/gregyjames/fastdate/blob/main/src/fastdatecore/src/constants.rs): `src/fastdatecore/src/constants.rs`

### Packed Results

- [Packed date-time](https://github.com/gregyjames/fastdate/blob/main/src/FastDate/NativeWrapper.cs): `src/FastDate/NativeWrapper.cs`
- [Date conversions](https://github.com/gregyjames/fastdate/blob/main/src/FastDate/DateTimeExtensions.cs): `src/FastDate/DateTimeExtensions.cs`

### Other components

- **Library caller**

## Connections

- Library caller → Parser API: parses dates (evidence: `README.md`)
- Parser API → Native bindings: calls native (evidence: `src/FastDate/Library.cs`)
- Parser API → Packed date-time: returns packed (evidence: `src/FastDate/Library.cs`)
- Library caller → Bulk parsing: parses batches (evidence: `src/FastDate/Library.cs`)
- Bulk parsing → Native bindings: calls bulk (evidence: `src/FastDate/Library.cs`)
- Native bindings → Rust exports: invokes exports (evidence: `src/FastDate/NativeWrapper.cs`)
- Rust exports → NEON parser: exports ARM (evidence: `src/fastdatecore/src/lib.rs`)
- Rust exports → SSE parser: exports x86 (evidence: `src/fastdatecore/src/lib.rs`)
- NEON parser → SIMD constants: uses constants (evidence: `src/fastdatecore/src/neon.rs`)
- SSE parser → SIMD constants: uses constants (evidence: `src/fastdatecore/src/sse.rs`)
- NEON parser → Packed date-time: produces packed (evidence: `src/fastdatecore/src/neon.rs`)
- SSE parser → Packed date-time: produces packed (evidence: `src/fastdatecore/src/sse.rs`)
- Packed date-time → Date conversions: converts to dates (evidence: `src/FastDate/NativeWrapper.cs`)
