File size: 2,096 Bytes
fb9597d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
language:
- en
tags:
- code
- rust
- payment-processing
- hyperswitch
- fintech
- dataset
- programming
size_categories:
- 10K<n<100K
source_datasets:
- hyperswitch
task_categories:
- text-generation
---
# Hyperswitch Rust Codebase Dataset

A comprehensive dataset extracted from the [Hyperswitch](https://github.com/juspay/hyperswitch) open-source payment processing platform, containing **16,731 code samples** across **37 modules** with **6.99M tokens** for training Rust code understanding and generation models.

## 📊 Dataset Overview

This dataset provides both **file-level** and **granular** code samples from Hyperswitch, a modern payment switch written in Rust. It's designed for training code models to understand payment processing patterns, Rust idioms, and large-scale system architecture.

### Key Statistics
- **Total Samples**: 16,990


## 🏗️ Dataset Structure

### Sample Distribution by Type

```
"total_samples": 16990,
  "file_level_samples": 3143,
  "granular_samples": 13847,
  "commit_samples": 0,
  "total_tokens": 8899898,
  "sample_types": {
    "impl_block": 4103,
    "function_signature": 3993,
    "struct_definition": 5484,
    "full_file": 1623,
    "doc_chunk": 69,
    "openapi_block": 709,
    "trait_definition": 221,
    "web_doc_file": 72,
    "doc_file": 238,
    "chunk": 432,
    "macro": 44,
    "impl_block_chunk": 2
  }
```

## 🙏 Acknowledgments

- **Hyperswitch Team** for building an excellent open-source payment platform
- **Rust Community** for creating robust tooling and documentation standards
- **Juspay Technologies** for open-sourcing this valuable codebase

## 📞 Citation

```bibtex
@dataset{HyperSwitch-Repo-CPT-Dataset-v2,
  title={HyperSwitch-Repo-CPT-Dataset-v2},
  author={Aditya Narayan},
  year={2024},
  publisher={Hugging Face},
  url={https://huggingface.co/datasets/AdityaNarayan/HyperSwitch-Repo-CPT-Dataset-v2},
  note={Extracted from https://github.com/juspay/hyperswitch}
}
```

---

*This dataset is part of ongoing research into domain-specific code model training for financial technology applications.*