File size: 2,082 Bytes
ca81dd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
79
80
81
82
83
84
85
86
87
88
89
90
91
---

language:
- en
license: apache-2.0
task_categories:
- text-generation
- question-answering
pretty_name: Rust-Coder
size_categories:
- 10K<n<100K
tags:
- rust
- programming
- education
- code-generation
dataset_info:
  features:
  - name: id
    dtype: string
  - name: instruction
    dtype: string
  - name: code
    dtype: string
  - name: explanation
    dtype: string
  - name: category
    dtype: string
  - name: topic
    dtype: string
  - name: metadata
    struct:
      - name: adjective
        dtype: string
      - name: verb
        dtype: string
      - name: context
        dtype: string
      - name: length
        dtype: int64
  splits:
  - name: train
    num_examples: 10800
  - name: validation
    num_examples: 1200
---


# Rust-Coder

**Rust-Coder** is a comprehensive text dataset designed for Rust programming language learning. It contains **12,000** unique samples focusing on distinct Rust concepts, code snippets, and explanations.

## Dataset Structure

Each sample consists of:
- `id`: A unique UUID.
- `instruction`: A prompt or question about a Rust concept.
- `code`: An idiomatic Rust code snippet.
- `explanation`: A detailed explanation of the concept and code.
- `category`: The high-level Rust category (e.g., Ownership & Borrowing).
- `topic`: The specific topic within the category.
- `metadata`: Additional details like used adjectives, verbs, and context.

## Covered Topics

- Ownership & Borrowing
- Types & Data Structures
- Control Flow & Logic
- Functions & Methods
- Error Handling
- Standard Library & Collections
- Concurrency & Parallelism
- Macros & Metaprogramming
- Unsafe & FFI
- Cargo & Tooling

## Duplicate Detection

Strict duplicate detection was implemented using SHA-256 hashing of instructions and code snippets to ensure 100% uniqueness across all 12,000 samples.

## Usage

```python

from datasets import load_dataset



dataset = load_dataset("Convence/Rust-Coder")

print(dataset['train'][0])

```

## License

Apache 2.0