fast-yaml-ffi 0.4.1

FFI utilities for fast-yaml bindings
Documentation

fast-yaml-ffi

Crates.io docs.rs CI MSRV License

FFI utilities for fast-yaml language bindings.

Installation

Add to your Cargo.toml:

[dependencies]
fast-yaml-ffi = "0.3"

Or with cargo-add:

cargo add fast-yaml-ffi

[!IMPORTANT] Requires Rust 1.88 or later.

Overview

This crate provides generic traits and utilities for converting between Rust types and foreign types (Python via PyO3, Node.js via NAPI-RS).

Core Traits

  • ToFfi<T> — Convert Rust types to foreign types
  • FromFfi<T> — Convert foreign types to Rust types

Usage

use fast_yaml_ffi::{ToFfi, FromFfi};

// Convert Rust value to Python object
let py_obj = rust_value.to_ffi()?;

// Convert Python object to Rust value
let rust_value = RustType::from_ffi(&py_obj)?;

[!NOTE] This crate is primarily used internally by fast-yaml (Python) and fast-yaml-nodejs bindings.

Related Crates

This crate is part of the fast-yaml workspace:

  • fast-yaml-core — Core YAML 1.2.2 parser and emitter
  • fast-yaml-linter — YAML linting with rich diagnostics
  • fast-yaml-parallel — Multi-threaded YAML processing

License

Licensed under either of Apache License, Version 2.0 or MIT License at your option.