fast-yaml-ffi
FFI utilities for fast-yaml language bindings.
Installation
Add to your Cargo.toml:
[]
= "0.3"
Or with cargo-add:
[!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 typesFromFfi<T>— Convert foreign types to Rust types
Usage
use ;
// Convert Rust value to Python object
let py_obj = rust_value.to_ffi?;
// Convert Python object to Rust value
let rust_value = from_ffi?;
[!NOTE] This crate is primarily used internally by
fast-yaml(Python) andfast-yaml-nodejsbindings.
Related Crates
This crate is part of the fast-yaml workspace:
fast-yaml-core— Core YAML 1.2.2 parser and emitterfast-yaml-linter— YAML linting with rich diagnosticsfast-yaml-parallel— Multi-threaded YAML processing
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.