Crates.io | encoding_c |
lib.rs | encoding_c |
version | 0.9.8 |
source | src |
created_at | 2017-02-27 12:57:29.92162 |
updated_at | 2020-05-13 07:05:26.377344 |
description | C API for encoding_rs |
homepage | https://docs.rs/encoding_c/ |
repository | https://github.com/hsivonen/encoding_c |
max_upload_size | |
id | 8712 |
size | 157,928 |
encoding_c is an FFI wrapper for encoding_rs.
encoding_rs::mem
See the encoding_c_mem
crate
for bindings for encoding_rs::mem
.
Please see the file named COPYRIGHT.
This crate is meant for use in binaries compiled with panic = 'abort'
, which
is required for correctness! Unwinding across FFI is Undefined Behavior, and
this crate does nothing to try to prevent unwinding across the FFI if
compiled with unwinding enabled.
include/encoding_rs.h
and include/encoding_rs_statics.h
are needed for C
usage.
include/encoding_rs_cpp.h
is a sample C++ API built on top of the C API using
GSL and the C++ standard library. Since C++ project typically roll their own
string classes, etc., it's probably necessary for C++ projects to manually
adapt the header to their replacements of standard-library types.
There's a write-up about the C++ wrappers.
links
value in the Cargo manifest.include_dir
variable from build script so that other build scripts
depending on this crate can rely on it.Decoder::latin1_byte_compatible_up_to
.Encoding::is_single_byte()
.encoding_for_name()
.data()
method of gsl::span
returning nullptr
.ENCODING_RS_NON_NULL_CONST_ENCODING_PTR
to
ENCODING_RS_NOT_NULL_CONST_ENCODING_PTR
. (Not a breaking change,
because defining that macro broke the build previously, so the
macro couldn't have been used.)ENCODING_RS_NON_NULL_CONST_ENCODING_PTR
.has_pending_state()
.char16_t
. Avoid including a header for it.std::slice::from_raw_parts()
.None
to SIZE_MAX
in the max length calculation functions.cheddar
-generated header and comment out the cheddar
-using
build.rs
.