Skip to content

bounverif/ry26

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ry26

A simple Rust library with command line interface for data point generation and manipulation.

Features

  • Add two numbers together
  • Generate random data points with timestamps
  • JSON serialization and deserialization
  • Command line interface for all library functions

Installation

cargo build --release

CLI Usage

The library includes a command line interface that exposes all main functions:

Add two numbers

ry26 add 5 10
# Output: 15

Generate a random data point

ry26 generate
# Output: {"id":625,"value":66.61,"timestamp":"2025-10-26T17:17:52.015300268+00:00"}

Convert data point to JSON

ry26 to-json --id 42 --value 3.14 --timestamp "2025-10-26T12:00:00Z"
# Output: {"id":42,"value":3.14,"timestamp":"2025-10-26T12:00:00Z"}

Parse JSON to data point

ry26 from-json '{"id":100,"value":50.5,"timestamp":"2025-10-26T15:30:00Z"}'
# Output:
# ID: 100
# Value: 50.5
# Timestamp: 2025-10-26T15:30:00Z

Get help

ry26 --help
ry26 add --help

Library Usage

Add to your Cargo.toml:

[dependencies]
ry26 = "0.1.0"

Use in your code:

use ry26::{add, generate_random_data_point, to_json, from_json};

// Add numbers
let result = add(5, 10);

// Generate random data point
let data = generate_random_data_point();

// Convert to JSON
let json = to_json(&data).unwrap();

// Parse from JSON
let parsed = from_json(&json).unwrap();

Testing

cargo test

License

See LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages