JanetDocsPlaygroundI'm feeling luckyGitHub sign in
(ffi/context "/usr/lib64/libSDL2.so") (ffi/defbind SDL_CreateWindow :ptr [title :string x :int y :int w :int h :int flags :uint32]) (ffi/defbind SDL_Delay :void [ms :uint32]) (ffi/defbind SDL_DestroyWindow :void [window :ptr]) (ffi/defbind SDL_Quit :void []) (def SDL_WINDOW_SHOWN 0x00000004) (defn main [&] (def window (SDL_CreateWindow "Hello world!" 0 0 640 480 SDL_WINDOW_SHOWN)) (SDL_Delay 4000) (SDL_DestroyWindow window) (SDL_Quit))