Crates.io | va_list |
lib.rs | va_list |
version | 0.2.1 |
created_at | 2015-06-07 05:20:57.461912+00 |
updated_at | 2025-05-28 11:08:26.246538+00 |
description | Provides a rust implementation of the 'va_list' type for a small set of ABIs. Allowing rust implementations of functions like vprintf. |
homepage | |
repository | https://github.com/thepowersgang/va_list-rs |
max_upload_size | |
id | 2331 |
size | 31,407 |
Rust implementation of C's va_list
type
This crate provides a rust VaList
type, which is binary-compatible for the C va_list
type. It is intended to allow rust code to provide the complex logic of variable argument functions.
extern crate va_list;
use va_list::VaList;
extern "C" print_ints_va(count: u32, mut args: VaList)
{
for i in (0 .. count) {
println!("{}: {}", i, args.get::<i32>());
}
}
aarch64
ELF: Minimal testing
cdecl32
32-bit: Minimal testing
cdecl
64-bit: CI tested
loongarch64
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.