Designing nice library APIs is hard
I am trying to write a safe wrapper around
I also wanted to make the api more rusty and easier to use.
First image = using chafa-sys straight out of the box.
Second image = the safe wrapper i am working on (heavily simplified)
I am trying to write a safe wrapper around
chafa-sys so that people don't have to use unsafe all over the place.I also wanted to make the api more rusty and easier to use.
First image = using chafa-sys straight out of the box.
Second image = the safe wrapper i am working on (heavily simplified)
Frectonz
this was so good i had to meme it https://t.me/frectonzchat/3968
@Chill_vibez installed nixos β‘οΈ, he is gonna be "declaring environments" in no time.
https://t.me/davedumps/1944
https://t.me/davedumps/1944
Telegram
Dave Dumps
Frectonz
Starship launch is going to happen today but it's getting overshadowed by the OpenAI news π
Btw i missed this, didn't watch the live stream
π₯1
I have just achieved the ultimate FFI threesome.
OCaml + Rust + C = β€οΈ
What you are seeing in the images is OCaml code calling out to Rust which in turn is calling out to C.
The actual flow
(->) this means calls into
You know complexity gets such a bad rep but it's actually cool when you actually understand it. Feeling pretty proud of myself to have achieved this π.
As always the code is on GitHub
OCaml + Rust + C = β€οΈ
What you are seeing in the images is OCaml code calling out to Rust which in turn is calling out to C.
The actual flow
(->) this means calls into
OCaml project -> chafa-ocaml (Rust to OCaml bindings) -> chafa (safe Rust wrapper) -> chafa-sys (unsafe FFI rust) -> chafa (the c lib)You know complexity gets such a bad rep but it's actually cool when you actually understand it. Feeling pretty proud of myself to have achieved this π.
As always the code is on GitHub
π₯14
Frectonz
I have just achieved the ultimate FFI threesome. OCaml + Rust + C = β€οΈ What you are seeing in the images is OCaml code calling out to Rust which in turn is calling out to C. The actual flow (->) this means calls into OCaml project -> chafa-ocaml (Rustβ¦
i might have peaked with this one. π
peaking.mkv
24.1 MB
Here is a vid to help you guys understand what you have just witnessed π.
π₯2π1