GitShow/BurntSushi/rust-csv
BurntSushi

rust-csv

A CSV parser for Rust, with Serde support.

by BurntSushi
csvlibraryrustrust-library
Star on GitHubFork

Rust

2.0k stars256 forks58 contributorsActive · 1mo agoSince 2014Unlicense

Meet the team

See all 58 on GitHub →
BurntSushi
BurntSushi400 contributions
paolobarbolini
paolobarbolini5 contributions
brandonw
brandonw3 contributions
EvinRobertson
EvinRobertson2 contributions
fhartwig
fhartwig2 contributions
huonw
huonw2 contributions
igor-raits
igor-raits2 contributions
jturner314
jturner3142 contributions

Languages

View on GitHub →
Rust99.5%
Shell0.3%
Python0.2%

Commit activity

Last 12 weeks · 1 commit

Full graph →

Community health

3 of 6 standards met

Community profile →
42
✓README✓License○Contributing○Code of Conduct✓Issue Template○PR Template

Recent PRs & issues

Active · Last activity 1mo ago
See all on GitHub →
DCjanus
fix: ignore comment lines at end of file in CSV parserOpenPR

This pull request fixes an issue in the CSV parser where comment lines at the end of a file were not properly ignored. According to expected behavior, if the last line(s) of a CSV file are comments (e.g., start with #), they should not be treated as data records, even if they appear at the end of the file without a trailing newline. Fix: #363 This is my first contribution to this project. If there are any issues with my implementation, code style, or the contribution process, please let me know. I am happy to make any necessary changes and appreciate your guidance. Thank you for your time and consideration!

DCjanus · 2w ago
onuracar-dev
Fix CRLF line positions after reading recordsOpenPR

Summary consume the LF portion of a CRLF terminator before returning a completed record preserve the record boundary when CRLF is split across input buffers keep reader and record line positions aligned with the next record Testing AI assistance disclosure: I used OpenAI Codex to help analyze the parser state machine, implement the change, and run and review the tests. I reviewed the complete diff and validation results. Fixes #395

onuracar-dev · 3w ago
jaideeppyne
fix(writer): escape the escape byte when double_quote is disabledOpenPR

When is disabled, the writer escapes quote characters with the escape character (default ), but it did not escape occurrences of the escape character itself in field data. Because the reader treats the escape character inside a quoted field as escaping the following byte, any escape character in the data was silently consumed on read-back. Repro (current ): A lone field is worse: it swallows the closing quote and the following delimiter, mangling the whole record. The writer already force-quotes fields containing the escape byte (), so the fix is to also double the escape byte inside when is false, making the escaping self-consistent and the round-trip lossless. The default () path is unchanged. Adds regression tests at the and levels.

jaideeppyne · 3w ago

Recent fixes

View closed PRs →
geeknoid
perf: reduce CSV parsing and record overheadMergedPR

scan ordinary DFA field bytes in runs instead of dispatching every byte build readers from configuration without cloning DFA storage preserve complete DFA state when cloning readers count newlines correctly with custom terminators and comments trim byte and string records in place without temporary records skip redundant ASCII trimming when reading string records clone only active header fields and bounds reserve field-bound storage from iterator lower bounds remove hot forward-iteration and active-slice bounds checks format StringRecord debug output without collecting fields validate byte-record UTF-8 once during deserialize_any inference fast-path successful char and empty-option deserialization use debug-only checking for the internal map-header invariant classify integer fields before attempting floating-point parsing inline reusable record reads to eliminate trim-flag overhead add Gungraun coverage for every existing benchmark and focused hot paths Representative benchmark results: Instruction counts are Callgrind results. Wall times are medians across three runs, each using the median of 21 batched samples.

geeknoid · 1mo ago
TheCrott
Add Fuzzing scriptMergedPR

This PR is to add fuzzing support, and I want to integrate into OSS-Fuzz. This is a free service by Google where they perform continuous fuzzing of open-source projects used by industry and with the only expectation that maintainers of the project will patch the bugs found by OSS-Fuzz. If you are interested in this, could you please provide me with an email address that will be receiving the bug reports that OSS-Fuzz find?

TheCrott · 3mo ago
Structured data for AI agents

Repository: BurntSushi/rust-csv. Description: A CSV parser for Rust, with Serde support. Stars: 1959, Forks: 256. Primary language: Rust. Languages: Rust (99.5%), Shell (0.3%), Python (0.2%). License: Unlicense. Topics: csv, library, rust, rust-library. Open PRs: 37, open issues: 65. Last activity: 1mo ago. Community health: 42%. Top contributors: BurntSushi, paolobarbolini, brandonw, EvinRobertson, fhartwig, huonw, igor-raits, jturner314, thaliaarchi, timhabermaas and others.

·@ofershap

Replace github.com with gitshow.dev