Planet of the Crabs
🦀 fearless rust


Rust and CSV parsing

Posted on by Andrew Gallant: BurntSushi

With csv 1.0 just released, the time is ripe for a tutorial on how to read and write CSV data in Rust. This tutorial is targeted toward beginning Rust programmers, and is therefore full of examples and spends some time on basic concepts. Experienced Rust programmers may find parts of this useful, but would probably be happier with a quick skim.

For an introduction to Rust, please see the official book. If you haven’t written any Rust code yet but have written code in another language, then this tutorial might be accessible to you without needing to read the book first.

The CSV library is available on Github and has comprehensive API documentation.

Finally, a version of this blog post is included as a tutorial in the API documentation, and is more likely to be updated as time passes.

Target audience: Beginning Rust programmers.