nushell / nushell/reedline

Make chrono optional

Open
#438 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-API A-Performance enhancement
Dominant language
Rust
Stars
818
Forks
249
Avg merge
4d 14h
Merged PRs (30d)
30

Description

Chrono is a relatively big dependency, at least making it optional would allow user to choose to remove it

cargo bloat: chrono alone is adding 1.1% to text section

File  .text    Size    Crate Name
0.1%   1.2% 19.4KiB      std addr2line::ResDwarf<R>::parse
0.1%   1.1% 18.4KiB      std std::backtrace_rs::symbolize::gimli::resolve::{{closure}}
0.1%   0.7% 11.7KiB reedline reedline::engine::Reedline::handle_editor_event
0.1%   0.6% 10.7KiB reedline reedline::main
0.0%   0.6%  9.5KiB      std addr2line::ResUnit<R>::parse_lines
0.0%   0.6%  9.4KiB   chrono <chrono::format::strftime::StrftimeItems as core::iter::traits::iterator::Iterator>::next
0.0%   0.5%  8.5KiB      std miniz_oxide::inflate::core::decompress
0.0%   0.5%  7.6KiB   chrono chrono::format::format_inner

here is an example implementation https://github.com/nushell/reedline/compare/main...sigmaSd:opt_chrono?expand=1

comparison with this pr

# with chrono
cargo tree | wc -l
> 88
# without chrono
 cargo tree --no-default-features | wc -l
> 77

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the linked opt_chrono comparison first, then inspect the repository's current Cargo feature and dependency configuration. Compare cargo tree output with and without the optional dependency, and verify that the project still builds and works when chrono is disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.