Safe wrappers for VFIO DesignThis repository provides safe wrappers over the VFIO driver framework.Many modern systems now provide DMA and interrupt remapping facilities to help ensure I/O devices behave within the boundaries they’ve been allotted. This includes x86 hardware with AMD-Vi and Intel ...
Safety : The code you write in a Rust NIF should never be able to crash the BEAM. Interop : Decoding and encoding rust values into Erlang terms is as easy as a function : call. Type composition : Making a Rust struct encodable and decodable to Erlang or Elixir can be done : with a...
This crate provides unsafeffibindings in theoqs-syscrate, and safe wrappers are offered via theoqscrate. The rendered Rustdoc documentation can befound here Usage Update yourCargo.tomland includeoqs: [dependencies]oqs="0.9.0" oqs-syscan be specified equivalently. ...
autocxx::include_cpp!{#include"url/origin.h"generate!("url::Origin")safety!(unsafe_ffi)}fnmain(){leto = ffi::url::Origin::CreateFromNormalizedTuple("https","google.com",443);leturi = o.Serialize();println!("URI is {}", uri.to_str().unwrap());} ...
CGlue exposes dyn Trait in FFI-safe manner. It bridges Rust traits between C and other languages. It aims to be seamless to integrate - just add a few annotations around your traits, and they should be good to go! use cglue::*; // One annotation for the trait. #[cglue_trait] pub...
Rust warns that pointers to structs tagged with non_exhaustive aren't FFI safe in downstream crates. We ran into this in the sdl3-sys crate, where I've marked some FFI types, e.g. SDL_Surface, as non_exhaustive because the internal definition of the type used by the SDL library is ...
rustix provides efficient memory-safe and I/O-safe wrappers to POSIX-like, Unix-like, Linux, and Winsock syscall-like APIs, with configurable backends. It uses Rust references, slices, and return values instead of raw pointers, and I/O safety types instead of raw file descriptors, providing ...
The section about the representation of pointers gives an example of C API using Box<T> on the Rust side and mapping it to struct T* on the C side. Box<T> is used both as parameter and return types. If it is sound to use Box<SomethingSiz...
Expand
This new warning is causing CI to fail warning: `extern` block uses type `u128`, which is not FFI-safe --> /home/sam/rust_ws/src/ros2_rust/rclrs_tests/target/debug/build/rclrs-8555e18c0c9bb180/out/rcl_bindings_generated.rs:6343:31 | 6343...