Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (21 sloc) 0.707 kb

FFI Talk

These are the slides and the example code I used in my FFI lighting talk. Broadly the examples assume a POSIX operating system and the S.M.A.R.T. example assumes Linux but could be ported elsewhere easy enough. Be careful, the examples are arranged to fit on a projector screen more than correctness:)

Examples

hello_world

Simple hello world example

hello

Example passing params to C function

inet_checksum

Example using pointers and semi-realistic computation

getpid

libc example that gets the current process id

S.M.A.R.T.

Native code returns pointers to structs containing hard drive diagnostic information (Linux specific)

Presentation

showoff slides

Jump to Line
Something went wrong with that request. Please try again.