dbenoit17 / dynamic-ffi

Auto define Racket bindings to C by parsing header files.
Other
28 stars 10 forks source link

Make FFI Objects from Racket Strings Containing C Code #6

Closed dbenoit17 closed 5 years ago

dbenoit17 commented 5 years ago

Something like this:

(dynamic-ffi-define 
"int ffi_add(int x, int y) { 
    return x + y; 
  }")
dbenoit17 commented 5 years ago

Python does ffi definitions in a similar way: https://cffi.readthedocs.io/en/latest/overview.html#main-mode-of-usage

dbenoit17 commented 5 years ago

This would also allow unit tests to be written in line.

dbenoit17 commented 5 years ago

how do we handle unicode values? fail or use -fextended-identifiers (not supported by all standards).

dbenoit17 commented 5 years ago

test/inline.rkt