28 lines
528 B
Racket
28 lines
528 B
Racket
#lang racket/base
|
|
|
|
(require ffi/unsafe)
|
|
|
|
(displayln "hello world")
|
|
|
|
(void (for/list ([i (in-list '(1 2 3 4 5))]) (printf "loop: ~a\n" i)))
|
|
|
|
(define table (dynamic-require ''static-ffi 'table))
|
|
(displayln "ffi table")
|
|
(displayln table)
|
|
|
|
(define func (cast (cadr (car table)) _int64 (_fun -> _void)))
|
|
|
|
(displayln "calling")
|
|
(func)
|
|
(displayln "back")
|
|
|
|
; (error "meow meow")
|
|
|
|
(module gui-test racket/gui
|
|
(provide run-test)
|
|
(define (run-test)
|
|
(message-box "hello" "hello world")))
|
|
|
|
(require (submod "." gui-test))
|
|
(run-test)
|