c interface of memx: the fast memory functions like libc memcmp(), memchr(), memmem(), memcpy(), memset()
cargo build --release
mkdir -p $HOME/.cargo/lib
cp -a target/release/libmemx_cdy.so target/release/libmemx_cdy.a $HOME/.cargo/lib
cargo deb
and install .deb into your local repository of debian package.
Easy to use, LD_PRELOAD.
$ LD_PRELOAD=~/.cargo/lib/libmemx_cdy.so command
or
$ export LD_PRELOAD=~/.cargo/lib/libmemx_cdy.so
$ LD_PRELOAD=/usr/lib/libmemx_cdy.so.0.1 command
or
$ export LD_PRELOAD=/usr/lib/libmemx_cdy.so.0.1
[dependencies]
memx-cdy = "0.1"
memx_init()
in main functionrust
fn main() {
memx_cdy::memx_init();
//
// follow your code
}
memx
- rust crate for the fast mem libmemchr()
- map to c memchr()memcmp()
- map to c memcmp()memcpy()
- map to c memcpy()memeq()
- map to c bcmpr()memmem()
- map to c memmem()memset()
- map to c memset()This project is licensed under either of
at your option.