csv

Fast, flexible CSV reading and writing for Rust, with Serde support

Library
Cargo
v1.4.0
1,954stars
Unlicense

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
54/100Fair
Development Activity48
Maintenance4
Community64
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
82/100Excellent
Architecture84
Code Quality85
Innovation75
Learning Curve82

The csv crate is BurntSushi’s fast CSV parser/writer for Rust, offering both a convenient, allocation-friendly high-level API and a low-level, allocation-free csv-core layer for performance-critical or no_std contexts. It handles the messy realities of real-world CSV — custom delimiters, quoting, variable record lengths, and encoding edge cases — while integrating directly with Serde so CSV rows can be deserialized straight into typed structs (and serialized back out) with minimal boilerplate.

The repository ships as three crates (csv, csv-core, csv-index) plus an extensive tutorial and cookbook built into the docs, reflecting its long history as one of the most widely relied-upon data-parsing crates in the Rust ecosystem.

What You Get

  • High-level Reader/Writer types for parsing and generating CSV from files, byte slices, or any io::Read/io::Write
  • First-class Serde integration for deserializing CSV rows directly into typed structs and serializing structs back to CSV
  • Support for custom delimiters, quoting styles, flexible record lengths, and both StringRecord/ByteRecord (valid-UTF-8 vs raw-bytes) row types
  • A separate, allocation-free csv-core crate for no_std or performance-critical parsing without the high-level convenience layer
  • A built-in tutorial and cookbook (src/tutorial.rs, src/cookbook.rs) with runnable examples for common read/write/performance patterns

Common Use Cases

  • Loading CSV data exports (analytics, financial, log data) directly into typed Rust structs via Serde for further processing
  • Streaming very large CSV files without loading them entirely into memory, using the low-level csv-core API
  • Writing structured data (reports, batch job output) out to CSV for downstream consumption by spreadsheets or other tools
  • Handling messy real-world CSV variants (custom delimiters, inconsistent quoting, ragged rows) that stricter parsers reject

Under The Hood

Architecture - The csv crate wraps the csv-core crate’s allocation-free, no_std-compatible parsing state machine with a buffered, allocating Reader/Writer layer; StringRecord/ByteRecord (src/string_record.rs, src/byte_record.rs) represent a parsed row either as validated UTF-8 or raw bytes, and src/deserializer.rs/src/serializer.rs bridge those records to/from Serde’s Deserialize/Serialize traits so structs can be read or written directly; csv-index builds on top of csv to provide indexed/random-access reads over large CSV files.

Tech Stack - Pure Rust across three workspace crates (csv, csv-core, csv-index), dual-licensed MIT/Unlicense, with benches/bench.rs for performance regression tracking and a CI pipeline (ci/script.sh) that runs the full test and benchmark suite; the crate deliberately avoids unnecessary dependencies to keep compile times and binary size low.

Code Quality - tests/tests.rs plus embedded doc-tests throughout src/tutorial.rs and src/cookbook.rs mean the extensive documentation examples are themselves compiled and checked as part of the test suite, preventing doc drift; the split between StringRecord and ByteRecord is a deliberate design choice to handle non-UTF-8 CSV data without panicking, reflecting attention to real-world data quality issues.

API Design - The crate is unusually well-documented for a Rust library, with an in-crate tutorial that walks from basic reading through Serde integration to performance tuning (allocation reuse, csv-core fallback), which substantially lowers the learning curve for a domain (CSV parsing) that has many easy-to-miss edge cases.

Used by 17 apps in this directory

Dart
74%
AGPL 3.0

AppFlowy

Productivity · Project Management · Collaboration

75,729

The open-source AI workspace that puts your data, your rules — with local LLMs, CRDT collaboration, and full self-hosting built in.

View details
66
Repo Health
81
Technical
66
Dependency
Built with
Dart74%
Rust24%
Updated 1 weeks ago
Rust
52%
Apache 2.0

cocoindex

Data Engineering · AI Development

11,350

An incremental data indexing engine that keeps AI agent context perpetually fresh by reprocessing only what changed.

View details
87
Repo Health
85
Technical
64
Dependency
Built with
Rust52%
Python48%
Updated yesterday
Rust
87%
MIT

fabro

Developer Tools · Devops

1,516

Define AI agent workflows as code graphs, route tasks across any LLM, and intervene only where it matters.

View details
81
Repo Health
83
Technical
70
Dependency
Built with
Rust87%
TypeScript11%
Updated yesterday
Rust
100%
Other

Fluree DB

Databases

445

A temporal, verifiable graph database with git-like branching, integrated vector/text/geo search, and RDF/SPARQL/JSON-LD/openCypher support — benchmarked at 10.4x faster than the next database on the full Wikidata dump.

View details
86
Repo Health
74
Technical
65
Dependency
Built with
Rust100%
Updated yesterday
TypeScript
75%
Other

Jan

AI Assistants

44,052

Run LLMs 100% locally with full privacy, or connect to cloud AI — your machine, your data, your control.

View details
90
Repo Health
81
Technical
66
Dependency
Built with
TypeScript75%
Rust21%
Updated today
Rust
100%
Other

Meilisearch

Search

59,012

Lightning-fast hybrid search engine with AI-powered semantic and full-text retrieval for modern applications.

View details
90
Repo Health
88
Technical
68
Dependency
Built with
Rust100%
Updated 5 days ago
Rust
72%
Apache 2.0

mesh-llm

AI Development · AI Agents

3,258

Mesh LLM pools GPUs and memory across every machine you own into one OpenAI-compatible API, so agents tap distributed compute instead of a single GPU box or a metered cloud bill.

View details
83
Repo Health
91
Technical
70
Dependency
Built with
Rust72%
TypeScript16%
Updated today
Rust
91%
Apache 2.0

Murr

Databases

107

A RocksDB-based NVMe/S3 cache purpose-built for AI inference workloads — a faster Redis replacement optimized for batch, low-latency, zero-copy reads and writes between data pipelines and inference apps.

View details
63
Repo Health
72
Technical
75
Dependency
Built with
Rust91%
Updated 1 months ago
Rust
87%
AGPL 3.0

ParadeDB

Search · Databases · Analytics

9,175

Born out of Y Combinator's S2023 batch, ParadeDB is a Postgres extension that delivers Elasticsearch-quality BM25 search and real-time analytics without a separate search cluster to manage.

View details
88
Repo Health
87
Technical
71
Dependency
Built with
Rust87%
PLpgSQL12%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search