This directory (base
) and its sibling (auxiliary
) contain C and C++ code respectively. This C/C++ code combines with the transpiled-to-C/C++ form of the Wuffs code in the top-level std
directory to create the “single file C/C++ library” form of the Wuffs standard library.
base
package types, such as I/O buffers, ranges and rects and statuses.base
types, such as constructing an I/O buffer from a pointer and a length, that aren’t relevant to Wuffs-the-language code.std
. For optimal performance, they sometimes require programming language features (e.g. function-pointer typed variables, SIMD acceleration) that are not yet available in Wuffs-the-language (or were not available at the time they were added). In the short term, it was more practical to implement them in carefully hand-written C/C++, in this directory. In the long term, they could migrate out of base
to be under std
, but any base
API removal would require a Wuffs version number bump.After editing source code in this directory, to see those changes when generating the C/C++ form of Wuffs' standard library:
go install github.com/google/wuffs/cmd/wuffs-c && wuffs gen base
This should modify the wuffs-unsupported-snapshot.c
file.