Created
March 30, 2013 00:40
-
-
Save jbclements/5274703 to your computer and use it in GitHub Desktop.
Linking to the rust library in racket.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; link to the rust library: | |
(define rust-lib (ffi-lib (build-path here "libblur-68a2c114141ca-0.0"))) | |
(define rust-blur-fun (get-ffi-obj "blur" rust-lib (_fun _uint _uint _cvector -> _void))) | |
(define (rust-blur width height data) | |
(define cvec (list->cvector data _byte)) | |
(rust-blur-fun width height cvec) | |
(cvector->list cvec)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment