Rust-Coder / README.md
Ill-Ness's picture
Upload Dataset
ca81dd6 verified
metadata
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

from datasets import load_dataset

dataset = load_dataset("Convence/Rust-Coder")
print(dataset['train'][0])

License

Apache 2.0