koffi 0.9.21 → 0.9.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CMakeLists.txt +1 -57
- package/README.md +6 -6
- package/benchmark/build.sh +13 -0
- package/benchmark/raylib_c +0 -0
- package/benchmark/raylib_c.c +83 -0
- package/benchmark/raylib_koffi.js +127 -0
- package/benchmark/raylib_node_ffi.js +144 -0
- package/package.json +3 -2
- package/src/call_arm32.cc +5 -8
- package/src/call_arm64.cc +14 -1
- package/src/call_arm64_fwd.S +18 -12
- package/src/call_x64_sysv.cc +5 -4
- package/src/ffi.cc +26 -38
- package/src/util.hh +5 -3
- package/test/registry/machines.json +21 -11
- package/test/test.js +2 -2
- package/test/tests/misc.c +38 -3
- package/test/tests/misc.js +8 -1
- package/test/tests/raylib.js +1 -1
- package/test/tests/sqlite.js +1 -1
- package/vendor/raylib/src/external/glfw/src/posix_time.c +3 -1
- package/vendor/raylib/src/external/glfw/src/wl_init.c +3 -1
- package/vendor/raylib/projects/VS2019/examples/audio_module_playing.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/audio_multichannel_sound.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/audio_music_stream.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/audio_raw_stream.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/audio_sound_loading.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_2d_camera.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_2d_camera_platformer.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_3d_camera_first_person.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_3d_camera_free.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_3d_camera_mode.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_3d_picking.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_basic_window.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_custom_logging.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_drop_files.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_input_gamepad.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_input_gestures.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_input_keys.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_input_mouse.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_input_mouse_wheel.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_input_multitouch.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_loading_thread.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_quat_conversion.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_random_values.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_scissor_test.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_split_screen.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_storage_values.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_vr_simulator.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_window_flags.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_window_letterbox.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/core_world_screen.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/easings_testbed.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/embedded_files_loading.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/models_animation.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/models_billboard.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/models_box_collisions.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/models_cubicmap.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/models_first_person_maze.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/models_geometric_shapes.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/models_heightmap.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/models_loading.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/models_loading_gltf.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/models_loading_vox.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/models_mesh_generation.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/models_mesh_picking.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/models_orthographic_projection.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/models_rlgl_solar_system.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/models_skybox.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/models_waving_cubes.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/models_yaw_pitch_roll.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/physics_demo.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/physics_friction.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/physics_movement.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/physics_restitution.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/physics_shatter.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/raudio_standalone.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/rlgl_standalone.vcxproj +0 -391
- package/vendor/raylib/projects/VS2019/examples/shaders_basic_lighting.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shaders_custom_uniform.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shaders_eratosthenes.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shaders_fog.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shaders_hot_reloading.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shaders_julia_set.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shaders_mesh_instancing.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shaders_model_shader.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shaders_multi_sample2d.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shaders_palette_switch.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shaders_postprocessing.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shaders_raymarching.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shaders_shapes_textures.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shaders_simple_mask.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shaders_spotlight.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shaders_texture_drawing.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shaders_texture_waves.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shapes_basic_shapes.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shapes_bouncing_ball.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shapes_collision_area.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shapes_colors_palette.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shapes_draw_circle_sector.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shapes_draw_rectangle_rounded.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shapes_draw_ring.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shapes_easings_ball_anim.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shapes_easings_box_anim.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shapes_easings_rectangle_array.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shapes_following_eyes.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shapes_lines_bezier.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shapes_logo_raylib.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shapes_logo_raylib_anim.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shapes_rectangle_scaling.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/shapes_top_down_lights.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/text_font_filters.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/text_font_loading.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/text_font_sdf.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/text_font_spritefont.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/text_format_text.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/text_input_box.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/text_raylib_fonts.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/text_rectangle_bounds.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/text_unicode.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/text_writing_anim.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_background_scrolling.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_blend_modes.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_bunnymark.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_draw_tiled.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_image_drawing.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_image_generation.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_image_loading.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_image_processing.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_image_text.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_logo_raylib.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_mouse_painting.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_npatch_drawing.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_particles_blending.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_raw_data.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_rectangle.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_sprite_button.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_sprite_explosion.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_srcrec_dstrec.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/examples/textures_to_image.vcxproj +0 -387
- package/vendor/raylib/projects/VS2019/raylib/raylib.vcxproj +0 -341
- package/vendor/raylib/projects/VS2019/raylib.sln +0 -2293
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/raylib_android.NativeActivity.vcxproj +0 -226
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/raylib_android.NativeActivity.vcxproj.filters +0 -10
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/raylib_android.NativeActivity.vcxproj.user +0 -4
- package/vendor/raylib/projects/VS2019-Android/raylib_android.sln +0 -75
- package/vendor/raylib/projects/VS2022/examples/audio_module_playing.vcxproj +0 -390
- package/vendor/raylib/projects/VS2022/examples/audio_multichannel_sound.vcxproj +0 -390
- package/vendor/raylib/projects/VS2022/examples/audio_music_stream.vcxproj +0 -390
- package/vendor/raylib/projects/VS2022/examples/audio_raw_stream.vcxproj +0 -390
- package/vendor/raylib/projects/VS2022/examples/audio_sound_loading.vcxproj +0 -390
- package/vendor/raylib/projects/VS2022/examples/core_2d_camera.vcxproj +0 -390
- package/vendor/raylib/projects/VS2022/examples/core_2d_camera_platformer.vcxproj +0 -390
- package/vendor/raylib/projects/VS2022/examples/core_3d_camera_first_person.vcxproj +0 -390
- package/vendor/raylib/projects/VS2022/examples/core_3d_camera_free.vcxproj +0 -390
- package/vendor/raylib/projects/VS2022/examples/core_3d_camera_mode.vcxproj +0 -390
- package/vendor/raylib/projects/VS2022/examples/core_3d_picking.vcxproj +0 -390
- package/vendor/raylib/projects/VS2022/examples/core_basic_window.vcxproj +0 -390
- package/vendor/raylib/projects/VS2022/examples/core_custom_logging.vcxproj +0 -390
- package/vendor/raylib/projects/VS2022/examples/core_drop_files.vcxproj +0 -390
- package/vendor/raylib/projects/VS2022/examples/core_input_gamepad.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/core_input_gestures.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/core_input_keys.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/core_input_mouse.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/core_input_mouse_wheel.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/core_input_multitouch.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/core_loading_thread.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/core_quat_conversion.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/core_random_values.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/core_scissor_test.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/core_split_screen.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/core_storage_values.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/core_vr_simulator.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/core_window_flags.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/core_window_letterbox.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/core_world_screen.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/easings_testbed.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/embedded_files_loading.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/models_animation.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/models_billboard.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/models_box_collisions.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/models_cubicmap.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/models_first_person_maze.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/models_geometric_shapes.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/models_heightmap.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/models_loading.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/models_loading_gltf.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/models_loading_vox.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/models_mesh_generation.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/models_mesh_picking.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/models_orthographic_projection.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/models_rlgl_solar_system.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/models_skybox.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/models_waving_cubes.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/models_yaw_pitch_roll.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/physics_demo.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/physics_friction.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/physics_movement.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/physics_restitution.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/physics_shatter.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/raudio_standalone.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/rlgl_standalone.vcxproj +0 -391
- package/vendor/raylib/projects/VS2022/examples/shaders_basic_lighting.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shaders_custom_uniform.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shaders_eratosthenes.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shaders_fog.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shaders_hot_reloading.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shaders_julia_set.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shaders_mesh_instancing.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shaders_model_shader.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shaders_multi_sample2d.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shaders_palette_switch.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shaders_postprocessing.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shaders_raymarching.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shaders_shapes_textures.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shaders_simple_mask.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shaders_spotlight.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shaders_texture_drawing.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shaders_texture_waves.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shapes_basic_shapes.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shapes_bouncing_ball.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shapes_collision_area.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shapes_colors_palette.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shapes_draw_circle_sector.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shapes_draw_rectangle_rounded.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shapes_draw_ring.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shapes_easings_ball_anim.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shapes_easings_box_anim.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shapes_easings_rectangle_array.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shapes_following_eyes.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shapes_lines_bezier.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shapes_logo_raylib.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shapes_logo_raylib_anim.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/shapes_rectangle_scaling.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/text_font_filters.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/text_font_loading.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/text_font_sdf.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/text_font_spritefont.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/text_format_text.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/text_input_box.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/text_raylib_fonts.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/text_rectangle_bounds.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/text_unicode.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/text_writing_anim.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_background_scrolling.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_blend_modes.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_bunnymark.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_draw_tiled.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_image_drawing.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_image_generation.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_image_loading.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_image_processing.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_image_text.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_logo_raylib.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_mouse_painting.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_npatch_drawing.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_particles_blending.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_raw_data.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_rectangle.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_sprite_button.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_sprite_explosion.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_srcrec_dstrec.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/examples/textures_to_image.vcxproj +0 -387
- package/vendor/raylib/projects/VS2022/raylib/raylib.vcxproj +0 -340
- package/vendor/raylib/projects/VS2022/raylib.sln +0 -2274
package/src/ffi.cc
CHANGED
|
@@ -566,6 +566,30 @@ InstanceData::InstanceData()
|
|
|
566
566
|
heap_mem.ptr = (uint8_t *)Allocator::Allocate(&mem_alloc, heap_mem.len);
|
|
567
567
|
}
|
|
568
568
|
|
|
569
|
+
template <typename Func>
|
|
570
|
+
static void SetExports(Napi::Env env, Func func)
|
|
571
|
+
{
|
|
572
|
+
func("struct", Napi::Function::New(env, CreateStructType));
|
|
573
|
+
func("handle", Napi::Function::New(env, CreateHandleType));
|
|
574
|
+
func("pointer", Napi::Function::New(env, CreatePointerType));
|
|
575
|
+
func("load", Napi::Function::New(env, LoadSharedLibrary));
|
|
576
|
+
func("in", Napi::Function::New(env, MarkIn));
|
|
577
|
+
func("out", Napi::Function::New(env, MarkOut));
|
|
578
|
+
func("inout", Napi::Function::New(env, MarkInOut));
|
|
579
|
+
|
|
580
|
+
func("internal", Napi::Boolean::New(env, true));
|
|
581
|
+
#if defined(_WIN32)
|
|
582
|
+
func("extension", Napi::String::New(env, ".dll"));
|
|
583
|
+
#elif defined(__APPLE__)
|
|
584
|
+
func("extension", Napi::String::New(env, ".dylib"));
|
|
585
|
+
#else
|
|
586
|
+
func("extension", Napi::String::New(env, ".so"));
|
|
587
|
+
#endif
|
|
588
|
+
|
|
589
|
+
Napi::Object types = InitBaseTypes(env);
|
|
590
|
+
func("types", types);
|
|
591
|
+
}
|
|
592
|
+
|
|
569
593
|
}
|
|
570
594
|
|
|
571
595
|
#if NODE_WANT_INTERNALS
|
|
@@ -604,25 +628,7 @@ static void InitInternal(v8::Local<v8::Object> target, v8::Local<v8::Value>,
|
|
|
604
628
|
instance->debug = GetDebugFlag("DUMP_CALLS");
|
|
605
629
|
FillRandomSafe(&instance->tag_lower, RG_SIZE(instance->tag_lower));
|
|
606
630
|
|
|
607
|
-
|
|
608
|
-
SetValue(env, target, "handle", Napi::Function::New(env_napi, CreateHandleType));
|
|
609
|
-
SetValue(env, target, "pointer", Napi::Function::New(env_napi, CreatePointerType));
|
|
610
|
-
SetValue(env, target, "load", Napi::Function::New(env_napi, LoadSharedLibrary));
|
|
611
|
-
SetValue(env, target, "in", Napi::Function::New(env_napi, MarkIn));
|
|
612
|
-
SetValue(env, target, "out", Napi::Function::New(env_napi, MarkOut));
|
|
613
|
-
SetValue(env, target, "inout", Napi::Function::New(env_napi, MarkInOut));
|
|
614
|
-
|
|
615
|
-
SetValue(env, target, "internal", Napi::Boolean::New(env_napi, true));
|
|
616
|
-
#if defined(_WIN32)
|
|
617
|
-
SetValue(env, target, "extension", Napi::String::New(env_napi, ".dll"));
|
|
618
|
-
#elif defined(__APPLE__)
|
|
619
|
-
SetValue(env, target, "extension", Napi::String::New(env_napi, ".dylib"));
|
|
620
|
-
#else
|
|
621
|
-
SetValue(env, target, "extension", Napi::String::New(env_napi, ".so"));
|
|
622
|
-
#endif
|
|
623
|
-
|
|
624
|
-
Napi::Object types = InitBaseTypes(env_cxx);
|
|
625
|
-
SetValue(env, target, "types", types);
|
|
631
|
+
SetExports(env_napi, [&](const char *name, Napi::Value value) { SetValue(env, target, name, value); });
|
|
626
632
|
}
|
|
627
633
|
|
|
628
634
|
#else
|
|
@@ -637,25 +643,7 @@ static Napi::Object InitModule(Napi::Env env, Napi::Object exports)
|
|
|
637
643
|
instance->debug = GetDebugFlag("DUMP_CALLS");
|
|
638
644
|
FillRandomSafe(&instance->tag_lower, RG_SIZE(instance->tag_lower));
|
|
639
645
|
|
|
640
|
-
|
|
641
|
-
exports.Set("handle", Napi::Function::New(env, CreateHandleType));
|
|
642
|
-
exports.Set("pointer", Napi::Function::New(env, CreatePointerType));
|
|
643
|
-
exports.Set("load", Napi::Function::New(env, LoadSharedLibrary));
|
|
644
|
-
exports.Set("in", Napi::Function::New(env, MarkIn));
|
|
645
|
-
exports.Set("out", Napi::Function::New(env, MarkOut));
|
|
646
|
-
exports.Set("inout", Napi::Function::New(env, MarkInOut));
|
|
647
|
-
|
|
648
|
-
exports.Set("internal", Napi::Boolean::New(env, false));
|
|
649
|
-
#if defined(_WIN32)
|
|
650
|
-
exports.Set("extension", Napi::String::New(env, ".dll"));
|
|
651
|
-
#elif defined(__APPLE__)
|
|
652
|
-
exports.Set("extension", Napi::String::New(env, ".dylib"));
|
|
653
|
-
#else
|
|
654
|
-
exports.Set("extension", Napi::String::New(env, ".so"));
|
|
655
|
-
#endif
|
|
656
|
-
|
|
657
|
-
Napi::Object types = InitBaseTypes(env);
|
|
658
|
-
exports.Set("types", types);
|
|
646
|
+
SetExports(env, [&](const char *name, Napi::Value value) { exports.Set(name, value); });
|
|
659
647
|
|
|
660
648
|
return exports;
|
|
661
649
|
}
|
package/src/util.hh
CHANGED
|
@@ -99,8 +99,8 @@ public:
|
|
|
99
99
|
return MakeSpan(ptr, len);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
template <typename T>
|
|
103
|
-
bool AllocStack(Size size, Size align, T **out_ptr);
|
|
102
|
+
template <typename T = void>
|
|
103
|
+
bool AllocStack(Size size, Size align, T **out_ptr = nullptr);
|
|
104
104
|
template <typename T>
|
|
105
105
|
bool AllocHeap(Size size, Size align, T **out_ptr);
|
|
106
106
|
|
|
@@ -127,7 +127,9 @@ bool CallData::AllocStack(Size size, Size align, T **out_ptr)
|
|
|
127
127
|
|
|
128
128
|
stack_mem->len -= delta;
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
if (out_ptr) {
|
|
131
|
+
*out_ptr = (T *)ptr;
|
|
132
|
+
}
|
|
131
133
|
return true;
|
|
132
134
|
}
|
|
133
135
|
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"directory": "/home/debian/luigi",
|
|
27
27
|
"build": {
|
|
28
28
|
"Install": "npm install --production --ignore-scripts",
|
|
29
|
-
"Build": "node ../cnoke/cnoke.js"
|
|
29
|
+
"Build Koffi": "node ../cnoke/cnoke.js",
|
|
30
|
+
"Build dependencies": "node ../cnoke/cnoke.js -C test"
|
|
30
31
|
},
|
|
31
32
|
"commands": {
|
|
32
33
|
"Test Raylib": "xvfb-run node test/tests/raylib.js",
|
|
@@ -64,7 +65,8 @@
|
|
|
64
65
|
"directory": "/home/debian/luigi",
|
|
65
66
|
"build": {
|
|
66
67
|
"Install": "npm install --production --ignore-scripts",
|
|
67
|
-
"Build": "node ../cnoke/cnoke.js"
|
|
68
|
+
"Build Koffi": "node ../cnoke/cnoke.js",
|
|
69
|
+
"Build dependencies": "node ../cnoke/cnoke.js -C test"
|
|
68
70
|
},
|
|
69
71
|
"commands": {
|
|
70
72
|
"Test Raylib": "xvfb-run node test/tests/raylib.js",
|
|
@@ -102,7 +104,8 @@
|
|
|
102
104
|
"directory": "/home/debian/luigi",
|
|
103
105
|
"build": {
|
|
104
106
|
"Install": "npm install --production --ignore-scripts",
|
|
105
|
-
"Build": "node ../cnoke/cnoke.js"
|
|
107
|
+
"Build Koffi": "node ../cnoke/cnoke.js",
|
|
108
|
+
"Build dependencies": "node ../cnoke/cnoke.js -C test"
|
|
106
109
|
},
|
|
107
110
|
"commands": {
|
|
108
111
|
"Test Raylib": "xvfb-run node test/tests/raylib.js",
|
|
@@ -140,7 +143,8 @@
|
|
|
140
143
|
"directory": "/home/debian/luigi",
|
|
141
144
|
"build": {
|
|
142
145
|
"Install": "npm install --production --ignore-scripts",
|
|
143
|
-
"Build": "node ../cnoke/cnoke.js"
|
|
146
|
+
"Build Koffi": "node ../cnoke/cnoke.js",
|
|
147
|
+
"Build dependencies": "node ../cnoke/cnoke.js -C test"
|
|
144
148
|
},
|
|
145
149
|
"commands": {
|
|
146
150
|
"Test Raylib": "xvfb-run node test/tests/raylib.js",
|
|
@@ -178,7 +182,8 @@
|
|
|
178
182
|
"directory": "C:/Users/windows/Desktop/luigi32",
|
|
179
183
|
"build": {
|
|
180
184
|
"Install": "C:\\Node32\\node32.cmd npm install --production --ignore-scripts",
|
|
181
|
-
"Build": "C:\\Node32\\node32.cmd node ../cnoke/cnoke.js"
|
|
185
|
+
"Build Koffi": "C:\\Node32\\node32.cmd node ../cnoke/cnoke.js",
|
|
186
|
+
"Build dependencies": "C:\\Node32\\node32.cmd node ../cnoke/cnoke.js -C test"
|
|
182
187
|
},
|
|
183
188
|
"commands": {
|
|
184
189
|
"Test Raylib": "seatsh C:\\Node32\\node32.cmd node test/tests/raylib.js",
|
|
@@ -191,7 +196,8 @@
|
|
|
191
196
|
"directory": "C:/Users/windows/Desktop/luigi64",
|
|
192
197
|
"build": {
|
|
193
198
|
"Install": "C:\\Node64\\node64.cmd npm install --production --ignore-scripts",
|
|
194
|
-
"Build": "C:\\Node64\\node64.cmd node ../cnoke/cnoke.js"
|
|
199
|
+
"Build Koffi": "C:\\Node64\\node64.cmd node ../cnoke/cnoke.js",
|
|
200
|
+
"Build dependencies": "C:\\Node64\\node64.cmd node ../cnoke/cnoke.js -C test"
|
|
195
201
|
},
|
|
196
202
|
"commands": {
|
|
197
203
|
"Test Raylib": "seatsh C:\\Node64\\node64.cmd node test/tests/raylib.js",
|
|
@@ -229,7 +235,8 @@
|
|
|
229
235
|
"directory": "/home/freebsd/luigi",
|
|
230
236
|
"build": {
|
|
231
237
|
"Install": "npm install --production --ignore-scripts",
|
|
232
|
-
"Build": "node ../cnoke/cnoke.js"
|
|
238
|
+
"Build Koffi": "node ../cnoke/cnoke.js",
|
|
239
|
+
"Build dependencies": "node ../cnoke/cnoke.js -C test"
|
|
233
240
|
},
|
|
234
241
|
"commands": {
|
|
235
242
|
"Test Raylib": "xvfb-run node test/tests/raylib.js",
|
|
@@ -267,7 +274,8 @@
|
|
|
267
274
|
"directory": "/home/freebsd/luigi",
|
|
268
275
|
"build": {
|
|
269
276
|
"Install": "npm install --production --ignore-scripts",
|
|
270
|
-
"Build": "node ../cnoke/cnoke.js"
|
|
277
|
+
"Build Koffi": "node ../cnoke/cnoke.js",
|
|
278
|
+
"Build dependencies": "node ../cnoke/cnoke.js -C test"
|
|
271
279
|
},
|
|
272
280
|
"commands": {
|
|
273
281
|
"Test Raylib": "xvfb-run node test/tests/raylib.js",
|
|
@@ -304,8 +312,9 @@
|
|
|
304
312
|
"FreeBSD ARM64": {
|
|
305
313
|
"directory": "/home/freebsd/luigi",
|
|
306
314
|
"build": {
|
|
307
|
-
"
|
|
308
|
-
"
|
|
315
|
+
"Install": "npm install --production --ignore-scripts",
|
|
316
|
+
"Build Koffi": "node ../cnoke/cnoke.js",
|
|
317
|
+
"Build dependencies": "node ../cnoke/cnoke.js -C test"
|
|
309
318
|
},
|
|
310
319
|
"commands": {
|
|
311
320
|
"Test Raylib": "xvfb-run node test/tests/raylib.js",
|
|
@@ -343,7 +352,8 @@
|
|
|
343
352
|
"directory": "/Users/macos/luigi",
|
|
344
353
|
"build": {
|
|
345
354
|
"Install": "PATH=/usr/local/bin:/usr/bin:/bin npm install --production --ignore-scripts",
|
|
346
|
-
"Build": "PATH=/usr/local/bin:/usr/bin:/bin SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk node ../cnoke/cnoke.js"
|
|
355
|
+
"Build Koffi": "PATH=/usr/local/bin:/usr/bin:/bin SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk node ../cnoke/cnoke.js",
|
|
356
|
+
"Build dependencies": "PATH=/usr/local/bin:/usr/bin:/bin SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk node ../cnoke/cnoke.js -C test"
|
|
347
357
|
},
|
|
348
358
|
"commands": {
|
|
349
359
|
"Test Misc": "PATH=/usr/local/bin:/usr/bin:/bin node test/tests/misc.js",
|
package/test/test.js
CHANGED
|
@@ -153,7 +153,7 @@ async function main() {
|
|
|
153
153
|
process.exit(1);
|
|
154
154
|
}
|
|
155
155
|
} else {
|
|
156
|
-
machines = new Set(
|
|
156
|
+
machines = new Set(Object.keys(machines_map));
|
|
157
157
|
|
|
158
158
|
if (!machines.size) {
|
|
159
159
|
console.error('Could not detect any machine');
|
|
@@ -618,7 +618,7 @@ function log(machine, action, status) {
|
|
|
618
618
|
}
|
|
619
619
|
|
|
620
620
|
let align1 = Math.max(log.align - machine.name.length, 0);
|
|
621
|
-
let align2 = Math.max(
|
|
621
|
+
let align2 = Math.max(34 - action.length, 0);
|
|
622
622
|
|
|
623
623
|
console.log(` [${machine.name}]${' '.repeat(align1)} ${action}${' '.repeat(align2)} ${status}`);
|
|
624
624
|
}
|
package/test/tests/misc.c
CHANGED
|
@@ -12,16 +12,21 @@
|
|
|
12
12
|
// along with this program. If not, see https://www.gnu.org/licenses/.
|
|
13
13
|
|
|
14
14
|
#include <stdio.h>
|
|
15
|
+
#include <stdint.h>
|
|
15
16
|
|
|
16
17
|
#ifdef _WIN32
|
|
17
18
|
#define EXPORT __declspec(dllexport)
|
|
18
19
|
#else
|
|
19
20
|
#define EXPORT __attribute__((visibility("default")))
|
|
20
21
|
#endif
|
|
21
|
-
#
|
|
22
|
-
#
|
|
22
|
+
#if defined(_M_IX86) || defined(__i386__)
|
|
23
|
+
#ifdef _MSC_VER
|
|
24
|
+
#define FASTCALL __fastcall
|
|
25
|
+
#else
|
|
26
|
+
#define FASTCALL __attribute__((fastcall))
|
|
27
|
+
#endif
|
|
23
28
|
#else
|
|
24
|
-
#define FASTCALL
|
|
29
|
+
#define FASTCALL
|
|
25
30
|
#endif
|
|
26
31
|
|
|
27
32
|
typedef struct Pack3 {
|
|
@@ -43,3 +48,33 @@ EXPORT void FASTCALL AddPack3(int a, int b, int c, Pack3 *p)
|
|
|
43
48
|
p->b += b;
|
|
44
49
|
p->c += c;
|
|
45
50
|
}
|
|
51
|
+
|
|
52
|
+
EXPORT int64_t ConcatenateToInt1(int8_t a, int8_t b, int8_t c, int8_t d, int8_t e, int8_t f,
|
|
53
|
+
int8_t g, int8_t h, int8_t i, int8_t j, int8_t k, int8_t l)
|
|
54
|
+
{
|
|
55
|
+
int64_t ret = 100000000000ull * a + 10000000000ull * b + 1000000000ull * c +
|
|
56
|
+
100000000ull * d + 10000000ull * e + 1000000ull * f +
|
|
57
|
+
100000ull * g + 10000ull * h + 1000ull * i +
|
|
58
|
+
100ull * j + 10ull * k + 1ull * l;
|
|
59
|
+
return ret;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
EXPORT int64_t ConcatenateToInt4(int32_t a, int32_t b, int32_t c, int32_t d, int32_t e, int32_t f,
|
|
63
|
+
int32_t g, int32_t h, int32_t i, int32_t j, int32_t k, int32_t l)
|
|
64
|
+
{
|
|
65
|
+
int64_t ret = 100000000000ull * a + 10000000000ull * b + 1000000000ull * c +
|
|
66
|
+
100000000ull * d + 10000000ull * e + 1000000ull * f +
|
|
67
|
+
100000ull * g + 10000ull * h + 1000ull * i +
|
|
68
|
+
100ull * j + 10ull * k + 1ull * l;
|
|
69
|
+
return ret;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
EXPORT int64_t ConcatenateToInt8(int64_t a, int64_t b, int64_t c, int64_t d, int64_t e, int64_t f,
|
|
73
|
+
int64_t g, int64_t h, int64_t i, int64_t j, int64_t k, int64_t l)
|
|
74
|
+
{
|
|
75
|
+
int64_t ret = 100000000000ull * a + 10000000000ull * b + 1000000000ull * c +
|
|
76
|
+
100000000ull * d + 10000000ull * e + 1000000ull * f +
|
|
77
|
+
100000ull * g + 10000ull * h + 1000ull * i +
|
|
78
|
+
100ull * j + 10ull * k + 1ull * l;
|
|
79
|
+
return ret;
|
|
80
|
+
}
|
package/test/tests/misc.js
CHANGED
|
@@ -36,11 +36,14 @@ async function main() {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
async function test() {
|
|
39
|
-
let lib_filename = path.dirname(__filename) + '
|
|
39
|
+
let lib_filename = path.dirname(__filename) + '/../build/misc' + koffi.extension;
|
|
40
40
|
let lib = koffi.load(lib_filename);
|
|
41
41
|
|
|
42
42
|
const FillPack3 = lib.cdecl('FillPack3', 'void', ['int', 'int', 'int', koffi.out(koffi.pointer(Pack3))]);
|
|
43
43
|
const AddPack3 = lib.fastcall('AddPack3', 'void', ['int', 'int', 'int', koffi.inout(koffi.pointer(Pack3))]);
|
|
44
|
+
const ConcatenateToInt1 = lib.cdecl('ConcatenateToInt1', 'int64_t', Array(12).fill('int8_t'));
|
|
45
|
+
const ConcatenateToInt4 = lib.cdecl('ConcatenateToInt4', 'int64_t', Array(12).fill('int32_t'));
|
|
46
|
+
const ConcatenateToInt8 = lib.cdecl('ConcatenateToInt8', 'int64_t', Array(12).fill('int64_t'));
|
|
44
47
|
|
|
45
48
|
let p = {};
|
|
46
49
|
|
|
@@ -49,4 +52,8 @@ async function test() {
|
|
|
49
52
|
|
|
50
53
|
AddPack3(6, 9, -12, p);
|
|
51
54
|
assert.deepEqual(p, { a: 7, b: 11, c: -9 });
|
|
55
|
+
|
|
56
|
+
assert.equal(ConcatenateToInt1(5, 6, 1, 2, 3, 9, 4, 4, 0, 6, 8, 7), 561239440687);
|
|
57
|
+
assert.equal(ConcatenateToInt4(5, 6, 1, 2, 3, 9, 4, 4, 0, 6, 8, 7), 561239440687);
|
|
58
|
+
assert.equal(ConcatenateToInt8(5, 6, 1, 2, 3, 9, 4, 4, 0, 6, 8, 7), 561239440687);
|
|
52
59
|
}
|
package/test/tests/raylib.js
CHANGED
|
@@ -83,7 +83,7 @@ async function main() {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
async function test() {
|
|
86
|
-
let lib_filename = path.dirname(__filename) + '
|
|
86
|
+
let lib_filename = path.dirname(__filename) + '/../build/raylib' + koffi.extension;
|
|
87
87
|
let lib = koffi.load(lib_filename);
|
|
88
88
|
|
|
89
89
|
const InitWindow = lib.cdecl('InitWindow', 'void', ['int', 'int', 'string']);
|
package/test/tests/sqlite.js
CHANGED
|
@@ -36,7 +36,7 @@ async function main() {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
async function test() {
|
|
39
|
-
let lib_filename = path.dirname(__filename) + '
|
|
39
|
+
let lib_filename = path.dirname(__filename) + '/../build/sqlite3' + koffi.extension;
|
|
40
40
|
let lib = koffi.load(lib_filename);
|
|
41
41
|
|
|
42
42
|
const sqlite3_open_v2 = lib.cdecl('sqlite3_open_v2', 'int', ['string', koffi.out(koffi.pointer(sqlite3_db)), 'int', 'string']);
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
// It is fine to use C99 in this file because it will not be built with VS
|
|
28
28
|
//========================================================================
|
|
29
29
|
|
|
30
|
-
#
|
|
30
|
+
#ifndef _POSIX_C_SOURCE
|
|
31
|
+
#define _POSIX_C_SOURCE 199309L
|
|
32
|
+
#endif
|
|
31
33
|
|
|
32
34
|
#include "internal.h"
|
|
33
35
|
|
|
@@ -26,7 +26,9 @@
|
|
|
26
26
|
// It is fine to use C99 in this file because it will not be built with VS
|
|
27
27
|
//========================================================================
|
|
28
28
|
|
|
29
|
-
#
|
|
29
|
+
#ifndef _POSIX_C_SOURCE
|
|
30
|
+
#define _POSIX_C_SOURCE 199309L
|
|
31
|
+
#endif
|
|
30
32
|
|
|
31
33
|
#include "internal.h"
|
|
32
34
|
|