Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 8 new columns ({'metadata', 'id', 'yanked', 'crate_name', 'deps', 'cksum', 'version', 'features'}) and 6 missing columns ({'name', 'max_dependency_count', 'content', 'total_versions', 'latest_version', 'yanked_versions'}).

This happened while the json dataset builder was generating data using

hf://datasets/Aptlantis/crates_io-all-including-yanked-jan-2026/crates_granular.jsonl (at revision 067720f219a0ad2e6bf1c97de0ce8ccc17f68d32), ['hf://datasets/Aptlantis/crates_io-all-including-yanked-jan-2026@067720f219a0ad2e6bf1c97de0ce8ccc17f68d32/crates_documents.jsonl', 'hf://datasets/Aptlantis/crates_io-all-including-yanked-jan-2026@067720f219a0ad2e6bf1c97de0ce8ccc17f68d32/crates_granular.jsonl']

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1887, in _prepare_split_single
                  writer.write_table(table)
                File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 675, in write_table
                  pa_table = table_cast(pa_table, self._schema)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2272, in table_cast
                  return cast_table_to_schema(table, schema)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2218, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              id: string
              crate_name: string
              version: string
              yanked: bool
              cksum: string
              features: string
              deps: string
              metadata: string
              to
              {'name': Value('string'), 'total_versions': Value('int64'), 'yanked_versions': List(Value('string')), 'latest_version': Value('string'), 'max_dependency_count': Value('int64'), 'content': Value('string')}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1342, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 907, in stream_convert_to_parquet
                  builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1736, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1889, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 8 new columns ({'metadata', 'id', 'yanked', 'crate_name', 'deps', 'cksum', 'version', 'features'}) and 6 missing columns ({'name', 'max_dependency_count', 'content', 'total_versions', 'latest_version', 'yanked_versions'}).
              
              This happened while the json dataset builder was generating data using
              
              hf://datasets/Aptlantis/crates_io-all-including-yanked-jan-2026/crates_granular.jsonl (at revision 067720f219a0ad2e6bf1c97de0ce8ccc17f68d32), ['hf://datasets/Aptlantis/crates_io-all-including-yanked-jan-2026@067720f219a0ad2e6bf1c97de0ce8ccc17f68d32/crates_documents.jsonl', 'hf://datasets/Aptlantis/crates_io-all-including-yanked-jan-2026@067720f219a0ad2e6bf1c97de0ce8ccc17f68d32/crates_granular.jsonl']
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

name
string
total_versions
int64
yanked_versions
list
latest_version
string
max_dependency_count
int64
content
string
AeP
4
[ "0.1.1", "0.1.0", "0.1.2", "0.1.3" ]
0.1.3
4
{"name": "AeP", "versions": [{"cksum": "b51d3b9cefa593052c356a170fb40ade592fbba098a9d9e93a036b410830567a", "crate_file": "AeP-0.1.1.crate", "crate_url": "https://static.crates.io/crates/AeP/AeP-0.1.1.crate", "deps": [{"default_features": true, "features": ["derive"], "kind": "normal", "name": "clap", "optional": false,...
BBP
1
[]
0.0.0
1
{"name": "BBP", "versions": [{"cksum": "25a2278bdcfa963b372b7a8d7609866af35b83de792df8ee0d8e24f640faa846", "crate_file": "BBP-0.0.0.crate", "crate_url": "https://static.crates.io/crates/BBP/BBP-0.0.0.crate", "deps": [{"default_features": true, "features": [], "kind": "normal", "name": "num", "optional": false, "req": "...
Boa
23
[]
0.9.0
23
{"name": "Boa", "versions": [{"cksum": "06e19f1f0ddc44df1dead853c637992b938aadce608e34aea3b08ca1e771cab2", "crate_file": "Boa-0.1.2.crate", "crate_url": "https://static.crates.io/crates/Boa/Boa-0.1.2.crate", "deps": [], "features": {}, "index_path": "3/b/boa", "name": "Boa", "vers": "0.1.2", "yanked": false}, {"cksum":...
FPS
4
[]
0.0.3
2
{"name": "FPS", "versions": [{"cksum": "a8b8216c74970c7339c82719f6cd156c49e627534804620618729e1eebca8886", "crate_file": "FPS-0.0.0.crate", "crate_url": "https://static.crates.io/crates/FPS/FPS-0.0.0.crate", "deps": [{"default_features": true, "features": [], "kind": "normal", "name": "ilog2", "optional": false, "req":...
GSL
35
[]
7.0.0-rc1
3
{"name": "GSL", "versions": [{"cksum": "e4fb521a21391498ee6c154349a6713c7577fe3b337ab5b2a782ee83a210bf80", "crate_file": "GSL-0.4.13.crate", "crate_url": "https://static.crates.io/crates/GSL/GSL-0.4.13.crate", "deps": [], "features": {}, "index_path": "3/g/gsl", "name": "GSL", "vers": "0.4.13", "yanked": false}, {"cksu...
IF
53
[]
0.0.9
7
{"name": "IF", "versions": [{"cksum": "4baa8d3a37e67d2574655c8426b3f5282dafa2fd9fc149f396a92a425dc5a1c8", "crate_file": "IF-0.0.0.crate", "crate_url": "https://static.crates.io/crates/IF/IF-0.0.0.crate", "deps": [{"default_features": true, "features": [], "kind": "normal", "name": "Mademoiselle_Entropia", "optional": f...
Q2
1
[]
0.1.0
0
{"name": "Q2", "versions": [{"cksum": "e750c3f8abf90b388fa3c11aaa6e2eb839cdd568529ba37da19a1740701242ad", "crate_file": "Q2-0.1.0.crate", "crate_url": "https://static.crates.io/crates/Q2/Q2-0.1.0.crate", "deps": [], "features": {}, "index_path": "2/q2", "name": "Q2", "vers": "0.1.0", "yanked": false}]}
Q3
2
[]
0.1.0
0
{"name": "Q3", "versions": [{"cksum": "816977f58d139ebdff20c06c523f7c2b3a5b72216a41e3e2e94b5fe18a43c2b0", "crate_file": "Q3-0.1.1.crate", "crate_url": "https://static.crates.io/crates/Q3/Q3-0.1.1.crate", "deps": [], "features": {}, "index_path": "2/q3", "name": "Q3", "vers": "0.1.1", "yanked": false}, {"cksum": "9a579c...
Qit
4
[]
0.1.3
1
{"name": "Qit", "versions": [{"cksum": "ac01a50d30499034cc086c0e259f71f0ce5f3f13e43b2eec58ed1e361808fb12", "crate_file": "Qit-0.1.0.crate", "crate_url": "https://static.crates.io/crates/Qit/Qit-0.1.0.crate", "deps": [{"default_features": true, "features": [], "kind": "normal", "name": "rand", "optional": false, "req": ...
Tal
1
[]
0.1.0
0
{"name": "Tal", "versions": [{"cksum": "b2f505228053aa7e5b7dd4f869c2af676560ba36fac22164513d355ddfb507f9", "crate_file": "Tal-0.1.0.crate", "crate_url": "https://static.crates.io/crates/Tal/Tal-0.1.0.crate", "deps": [], "features": {}, "index_path": "3/t/tal", "name": "Tal", "vers": "0.1.0", "yanked": false}]}
Zen
1
[]
0.0.0
0
{"name": "Zen", "versions": [{"cksum": "6f0b16f9cb4ec769785e44c13e3c1a23af81daf7eb306e31fd3599db0b6710ae", "crate_file": "Zen-0.0.0.crate", "crate_url": "https://static.crates.io/crates/Zen/Zen-0.0.0.crate", "deps": [], "features": {}, "index_path": "3/z/zen", "name": "Zen", "vers": "0.0.0", "yanked": false}]}
a0kzg
2
[ "0.1.0", "0.1.1" ]
0.1.1
3
{"name": "a0kzg", "versions": [{"cksum": "884fcedb819b9290ac30b97757427e0c9a325c8505b4dbaf8a81b0e30c2bc27f", "crate_file": "a0kzg-0.1.0.crate", "crate_url": "https://static.crates.io/crates/a0kzg/a0kzg-0.1.0.crate", "deps": [{"default_features": true, "features": [], "kind": "normal", "name": "bls12_381", "optional": f...
a11y
12
[]
0.2.1
5
{"name": "a11y", "versions": [{"cksum": "32edd4ac658177de6fd7943f241956c4af0fd802706837069008b9db1c1952ec", "crate_file": "a11y-0.1.0.crate", "crate_url": "https://static.crates.io/crates/a11y/a11y-0.1.0.crate", "deps": [{"default_features": true, "features": [], "kind": "normal", "name": "rigela-utils", "optional": tr...
End of preview.

Crates.io Dataset

Source: Crates.io Index Dump Processing Type: Extractive, Temporal/Versioned Flattening.

Overview

This dataset represents the evolutionary history of the Rust package ecosystem. Derived from the official Crates.io index, it captures the dependency graph and version metadata for over 222,000 crates.

Unique to this dataset is the explicit preservation and flagging of "yanked" versions (versions retracted by authors usually due to critical bugs or security issues). This makes the dataset particularly valuable for:

  • Supply Chain Security Analysis
  • Dependency Resolution Research
  • Ecosystem Evolution Modeling

Methodology

The raw index data (JSONL) was processed to create two complementary views:

1. Documents (Macro)

  • File: output/crates_documents.jsonl
  • Unit: One Crate (e.g., serde, tokio).
  • Content: Aggregates the entire history of the crate. Contains a list of all released versions, identifying which are yanked, and summary statistics like max dependency counts.
  • Use Case: Learning the lifecycle of packages; Predicting maintenance status.

2. Granular (Micro)

  • File: output/crates_granular.jsonl / .parquet
  • Unit: One Version (e.g., serde-1.0.0).
  • Content: Detailed metadata for a specific release, including:
    • yanked: Boolean flag (True/False).
    • deps: Full dependency list for that version.
    • features: Feature flags available.
    • cksum: Checksum for verifycation.
  • Use Case: Training dependency resolvers; Vulnerability analysis (finding crates that depend on yanked versions).

Statistics

(See STATS.md for latest build details)

  • Total Crates: ~222k
  • Total Versions: ~1.9M
  • Yanked Versions: 92k (4.8% of all releases)

Schema

Documents

Field Type Description
name string Crate name.
total_versions int Count of all releases.
yanked_versions list[str] List of version strings that are yanked.
latest_version string Simple latest version heuristic.
content json-string Full blob of version history.

Granular

Field Type Description
id string name-version unique identifier.
crate_name string Name of the crate.
version string Version number.
yanked boolean Critical: True if version is restricted.
deps json-string Dependencies.
  • Processor: src/process_crates.py

Data Acquisition & Tooling

The raw data processing relies on custom tooling located in scripts/cmd:

download-crates

A Go-based utility designed to mirror the Crates.io registry.

  • Function: Downloads .crate files concurrently from the official registry.
  • Features:
    • Validates checksums (SHA256) against the index.
    • Supports creating aggregated "bundles" (.tar.zst) to minimize small-file I/O issues on datasets of this scale (~700GB+).
    • Robust retry logic and concurrency management.
  • Source: scripts/cmd/download-crates/main.go

generate-sidecars

A metadata extraction tool.

  • Function: Parses the local crates.io-index (git registry) and generates metadata "sidecars".
  • Usage: Likely the precursor to generating the crates.all.jsonl index dump used in this pipeline.
  • Source: scripts/cmd/generate-sidecars/main.go
Downloads last month
15