BurntSushi / BurntSushi/rust-csv

Make serde an optional dependency

Open
#126 5 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
2k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

From the example I have the impression that serde is not actually needed in order to use this crate. If I am correct, then it would be better to specify serde as an optional dependency and compile it only if the user wants it. It would be like this:

`Cargo.toml`
```toml
[dependencies]
serde = {version = "1.0.55", optional = true}

[features]
default = ["serde"]
```

This way, if the user does not want serde, all what it has to do is to put this in his `Cargo.toml`

```toml
[dependencies.csv]
version = "1"
default-features = false
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing Cargo.toml and the crate's example to confirm whether serde is required for the example or the library. Configure serde as an optional dependency with the proposed default feature behavior, then verify that the crate still builds with default features and with default-features = false.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.