yad_core

Crates.ioyad_core
lib.rsyad_core
version2.0.0
created_at2025-08-21 19:54:42.362872+00
updated_at2025-09-15 23:13:13.20602+00
descriptionYAD-Core manages the lowest level of YAD, its primitive values.
homepage
repositoryhttps://github.com/KingsBeCattz/yad
max_upload_size
id1805262
size93,432
KingsBeCattz (KingsBeCattz)

documentation

https://docs.rs/yad_core

README

YAD Core

YAD Core is a Rust crate focused exclusively on the low-level Value type, supporting numbers, strings, booleans, and arrays.

⚠️ NOTE: THIS CRATE, WHICH PREVIOUSLY HANDLED FULL SERIALIZATION AND DESERIALIZATION, NOW ONLY MANAGES VALUES. The previous full functionality has been moved to serde_yad.

This crate provides:

  • The Value type for primitive and array data
  • A lightweight FFI module for cross-language interoperability

📖 Learn more about the YAD project here.


✨ Features

  • Fast and lightweight representation of numbers, strings, booleans, and arrays
  • Strongly typed primitive values
  • Cross-language support via FFI

🚀 Usage

Add the crate to your Cargo.toml:

cargo add yad_core

Example: Creating various Values

use yad_core::Value;

fn main() {
    println!("String: {}", Value::try_from("Hello!").unwrap());
    println!("Unsigned Integer: {}", Value::from(324u16));
    println!("Signed Integer: {}", Value::from(-28i8));
    println!("Float: {}", Value::from(123.729304f32));
    println!("Bool: {}", Value::from(false));
    println!("Vector: {:?}", Value::try_from(vec![Value::from(256u64)]).unwrap());
}

FFI Usage

The ffi module provides interoperability with other languages, exposing functions to create and manipulate Value types from external code.

Commit count: 60

cargo fmt