~/talk

À la carte: mix and match C, Rust and Go!

Talkat DevConf.CZ 2020 · 2020-01-24..01-26· [compilers-and-language-design, rust]
links:none on file
slides:none on file

Practical recipe and working code for replacing or mixing a C library with Rust or Go: a small toy name builder library implements objects, callbacks and error reporting and the repository contains a working implementation. Uses bindgen + Cargo build.rs to generate Rust bindings, cgo lookup table trick to pass Go callbacks to C, and boxed pointers for C↔Rust object handles. Two surprising lessons: calling Go from C is uncommon but possible, and most glue code is mechanical and suitable for code generation; examples work but aren’t production-tested.

AI-written summary · about

  1. 0:00Intro
  2. 0:37Goal
  3. 1:07What we want
  4. 1:20Complexity
  5. 2:19Disclaimers
  6. 2:57Fun Name Builder
  7. 4:52Interface
  8. 5:20Why
  9. 5:50Error API
  10. 7:44Rest
  11. 7:58Rust
  12. 8:10Go
  13. 8:21Rust bindings
  14. 8:46Rust build script
  15. 14:22Go bindings
  16. 14:33Go flags
  17. 18:10C flags
  18. 18:30Static Linking
  19. 21:44Go from C
  20. 22:03Structure
  21. 29:05What we learned
  22. 30:51Shoutouts
  23. 31:21Questions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.