|
|
@ -0,0 +1,22 @@
|
|
|
1
|
# coffi - Some FFI experiments in Rust
|
|
|
2
|
|
|
|
3
|
Playing with the FFI in Rust. Surprisingly easy, but there are likely
|
|
|
4
|
dragons elsewhere.
|
|
|
5
|
|
|
|
6
|
## Quickstart
|
|
|
7
|
|
|
|
8
|
Display some information about a PNG file, most notably it's width and
|
|
|
9
|
height.
|
|
|
10
|
|
|
|
11
|
```
|
|
|
12
|
cargo run <path-to-png>
|
|
|
13
|
```
|
|
|
14
|
|
|
|
15
|
If you use emacs, `flycheck-mode` can check the code on the *fly*, which
|
|
|
16
|
is awesome!
|
|
|
17
|
|
|
|
18
|
## Why "coffi"?
|
|
|
19
|
|
|
|
20
|
Not sure, only the "ffi" part makes sense now. Ah, no, the "co" comes
|
|
|
21
|
from `cos`, which was the first function we wanted to wrap. That turned
|
|
|
22
|
out so easy that we tried `libpng` next.
|