fast-yaml-ffi

Crates.iofast-yaml-ffi
lib.rsfast-yaml-ffi
version0.4.1
created_at2025-12-13 22:08:06.644548+00
updated_at2026-01-17 16:09:24.643247+00
descriptionFFI utilities for fast-yaml bindings
homepage
repositoryhttps://github.com/bug-ops/fast-yaml
max_upload_size
id1983485
size12,547
Andrei G (bug-ops)

documentation

README

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.

Commit count: 232

cargo fmt