fork/rust
git clone https://git.julia.blue/fork/rust
4fb7144ed15
1.43.0
1#include <stddef.h> 2#include <stdint.h> 3 4struct ByteSlice { 5 uint8_t *data; 6 size_t len; 7}; 8 9size_t slice_len(struct ByteSlice bs) { 10 return bs.len; 11} 12 13uint8_t slice_elem(struct ByteSlice bs, size_t idx) { 14 return bs.data[idx]; 15}