Crate raylib_ffi

Source
Expand description

§Direct raylib bindings for Rust

Crates.io Docs.rs Build Status

raylib-ffi aims to provide a “no frills” direct binding to raylib for rust developers.

This library is largely auto-generated by the code in build/. Raylib itself exposes lots of metadata, meaning that wrappers can auto-translate the C API into whatever language is needed (in this case, Rust).

§Dependencies

Fedora:

dnf install clang-devel alsa-lib-devel mesa-libGL-devel libX11-devel libXrandr-devel libXi-devel libXcursor-devel libXinerama-devel libatomic cmake

§Verifying your build

raylib-ffi bundles a rust version of the example project from raylib proper. To verify your build of this library worked, run:

cargo run --example basic

§Versioning policy

raylib-ffi follows SemVer.

The major and minor version numbers of a raylib-ffi will always match the version of raylib it was built against. The patch version may be incremented if a rust-only fix is needed at any point.

Modules§

colors
This module contains auto-generated Rust representations of raylib’s colors.
enums
This module contains auto-generated Rust representations of raylib’s enums.
macros
Quality of life macros

Macros§

draw
Begins drawing, creates a new scope, executes code, then cleans up
rl_str
Converts a string to *const i8 for use with raylib

Structs§

AudioStream
AutomationEvent
AutomationEventList
BoneInfo
BoundingBox
Camera2D
Camera3D
Color
FilePathList
Font
GlyphInfo
Image
Material
MaterialMap
Matrix
Mesh
Model
ModelAnimation
Music
NPatchInfo
Ray
RayCollision
Rectangle
RenderTexture
Shader
Sound
Texture
Transform
Vector2
Vector3
Vector4
VrDeviceInfo
VrStereoConfig
Wave
__va_list_tag
rAudioBuffer
rAudioProcessor

Constants§

RAYLIB_VERSION
RAYLIB_VERSION_MAJOR
RAYLIB_VERSION_MINOR
RAYLIB_VERSION_PATCH

Functions§

AttachAudioMixedProcessor
AttachAudioStreamProcessor
BeginBlendMode
BeginDrawing
BeginMode2D
BeginMode3D
BeginScissorMode
BeginShaderMode
BeginTextureMode
BeginVrStereoMode
ChangeDirectory
CheckCollisionBoxSphere
CheckCollisionBoxes
CheckCollisionCircleLine
CheckCollisionCircleRec
CheckCollisionCircles
CheckCollisionLines
CheckCollisionPointCircle
CheckCollisionPointLine
CheckCollisionPointPoly
CheckCollisionPointRec
CheckCollisionPointTriangle
CheckCollisionRecs
CheckCollisionSpheres
ClearBackground
ClearWindowState
CloseAudioDevice
CloseWindow
CodepointToUTF8
ColorAlpha
ColorAlphaBlend
ColorBrightness
ColorContrast
ColorFromHSV
ColorFromNormalized
ColorIsEqual
ColorLerp
ColorNormalize
ColorTint
ColorToHSV
ColorToInt
CompressData
ComputeCRC32
ComputeMD5
ComputeSHA1
DecodeDataBase64
DecompressData
DetachAudioMixedProcessor
DetachAudioStreamProcessor
DirectoryExists
DisableCursor
DisableEventWaiting
DrawBillboard
DrawBillboardPro
DrawBillboardRec
DrawBoundingBox
DrawCapsule
DrawCapsuleWires
DrawCircle
DrawCircle3D
DrawCircleGradient
DrawCircleLines
DrawCircleLinesV
DrawCircleSector
DrawCircleSectorLines
DrawCircleV
DrawCube
DrawCubeV
DrawCubeWires
DrawCubeWiresV
DrawCylinder
DrawCylinderEx
DrawCylinderWires
DrawCylinderWiresEx
DrawEllipse
DrawEllipseLines
DrawFPS
DrawGrid
DrawLine
DrawLine3D
DrawLineBezier
DrawLineEx
DrawLineStrip
DrawLineV
DrawMesh
DrawMeshInstanced
DrawModel
DrawModelEx
DrawModelPoints
DrawModelPointsEx
DrawModelWires
DrawModelWiresEx
DrawPixel
DrawPixelV
DrawPlane
DrawPoint3D
DrawPoly
DrawPolyLines
DrawPolyLinesEx
DrawRay
DrawRectangle
DrawRectangleGradientEx
DrawRectangleGradientH
DrawRectangleGradientV
DrawRectangleLines
DrawRectangleLinesEx
DrawRectanglePro
DrawRectangleRec
DrawRectangleRounded
DrawRectangleRoundedLines
DrawRectangleRoundedLinesEx
DrawRectangleV
DrawRing
DrawRingLines
DrawSphere
DrawSphereEx
DrawSphereWires
DrawSplineBasis
DrawSplineBezierCubic
DrawSplineBezierQuadratic
DrawSplineCatmullRom
DrawSplineLinear
DrawSplineSegmentBasis
DrawSplineSegmentBezierCubic
DrawSplineSegmentBezierQuadratic
DrawSplineSegmentCatmullRom
DrawSplineSegmentLinear
DrawText
DrawTextCodepoint
DrawTextCodepoints
DrawTextEx
DrawTextPro
DrawTexture
DrawTextureEx
DrawTextureNPatch
DrawTexturePro
DrawTextureRec
DrawTextureV
DrawTriangle
DrawTriangle3D
DrawTriangleFan
DrawTriangleLines
DrawTriangleStrip
DrawTriangleStrip3D
EnableCursor
EnableEventWaiting
EncodeDataBase64
EndBlendMode
EndDrawing
EndMode2D
EndMode3D
EndScissorMode
EndShaderMode
EndTextureMode
EndVrStereoMode
ExportAutomationEventList
ExportDataAsCode
ExportFontAsCode
ExportImage
ExportImageAsCode
ExportImageToMemory
ExportMesh
ExportMeshAsCode
ExportWave
ExportWaveAsCode
Fade
FileExists
GenImageCellular
GenImageChecked
GenImageColor
GenImageFontAtlas
GenImageGradientLinear
GenImageGradientRadial
GenImageGradientSquare
GenImagePerlinNoise
GenImageText
GenImageWhiteNoise
GenMeshCone
GenMeshCube
GenMeshCubicmap
GenMeshCylinder
GenMeshHeightmap
GenMeshHemiSphere
GenMeshKnot
GenMeshPlane
GenMeshPoly
GenMeshSphere
GenMeshTangents
GenMeshTorus
GenTextureMipmaps
GetApplicationDirectory
GetCameraMatrix
GetCameraMatrix2D
GetCharPressed
GetClipboardImage
GetClipboardText
GetCodepoint
GetCodepointCount
GetCodepointNext
GetCodepointPrevious
GetCollisionRec
GetColor
GetCurrentMonitor
GetDirectoryPath
GetFPS
GetFileExtension
GetFileLength
GetFileModTime
GetFileName
GetFileNameWithoutExt
GetFontDefault
GetFrameTime
GetGamepadAxisCount
GetGamepadAxisMovement
GetGamepadButtonPressed
GetGamepadName
GetGestureDetected
GetGestureDragAngle
GetGestureDragVector
GetGestureHoldDuration
GetGesturePinchAngle
GetGesturePinchVector
GetGlyphAtlasRec
GetGlyphIndex
GetGlyphInfo
GetImageAlphaBorder
GetImageColor
GetKeyPressed
GetMasterVolume
GetMeshBoundingBox
GetModelBoundingBox
GetMonitorCount
GetMonitorHeight
GetMonitorName
GetMonitorPhysicalHeight
GetMonitorPhysicalWidth
GetMonitorPosition
GetMonitorRefreshRate
GetMonitorWidth
GetMouseDelta
GetMousePosition
GetMouseWheelMove
GetMouseWheelMoveV
GetMouseX
GetMouseY
GetMusicTimeLength
GetMusicTimePlayed
GetPixelColor
GetPixelDataSize
GetPrevDirectoryPath
GetRandomValue
GetRayCollisionBox
GetRayCollisionMesh
GetRayCollisionQuad
GetRayCollisionSphere
GetRayCollisionTriangle
GetRenderHeight
GetRenderWidth
GetScreenHeight
GetScreenToWorld2D
GetScreenToWorldRay
GetScreenToWorldRayEx
GetScreenWidth
GetShaderLocation
GetShaderLocationAttrib
GetShapesTexture
GetShapesTextureRectangle
GetSplinePointBasis
GetSplinePointBezierCubic
GetSplinePointBezierQuad
GetSplinePointCatmullRom
GetSplinePointLinear
GetTime
GetTouchPointCount
GetTouchPointId
GetTouchPosition
GetTouchX
GetTouchY
GetWindowHandle
GetWindowPosition
GetWindowScaleDPI
GetWorkingDirectory
GetWorldToScreen
GetWorldToScreen2D
GetWorldToScreenEx
HideCursor
ImageAlphaClear
ImageAlphaCrop
ImageAlphaMask
ImageAlphaPremultiply
ImageBlurGaussian
ImageClearBackground
ImageColorBrightness
ImageColorContrast
ImageColorGrayscale
ImageColorInvert
ImageColorReplace
ImageColorTint
ImageCopy
ImageCrop
ImageDither
ImageDraw
ImageDrawCircle
ImageDrawCircleLines
ImageDrawCircleLinesV
ImageDrawCircleV
ImageDrawLine
ImageDrawLineEx
ImageDrawLineV
ImageDrawPixel
ImageDrawPixelV
ImageDrawRectangle
ImageDrawRectangleLines
ImageDrawRectangleRec
ImageDrawRectangleV
ImageDrawText
ImageDrawTextEx
ImageDrawTriangle
ImageDrawTriangleEx
ImageDrawTriangleFan
ImageDrawTriangleLines
ImageDrawTriangleStrip
ImageFlipHorizontal
ImageFlipVertical
ImageFormat
ImageFromChannel
ImageFromImage
ImageKernelConvolution
ImageMipmaps
ImageResize
ImageResizeCanvas
ImageResizeNN
ImageRotate
ImageRotateCCW
ImageRotateCW
ImageText
ImageTextEx
ImageToPOT
InitAudioDevice
InitWindow
IsAudioDeviceReady
IsAudioStreamPlaying
IsAudioStreamProcessed
IsAudioStreamValid
IsCursorHidden
IsCursorOnScreen
IsFileDropped
IsFileExtension
IsFileNameValid
IsFontValid
IsGamepadAvailable
IsGamepadButtonDown
IsGamepadButtonPressed
IsGamepadButtonReleased
IsGamepadButtonUp
IsGestureDetected
IsImageValid
IsKeyDown
IsKeyPressed
IsKeyPressedRepeat
IsKeyReleased
IsKeyUp
IsMaterialValid
IsModelAnimationValid
IsModelValid
IsMouseButtonDown
IsMouseButtonPressed
IsMouseButtonReleased
IsMouseButtonUp
IsMusicStreamPlaying
IsMusicValid
IsPathFile
IsRenderTextureValid
IsShaderValid
IsSoundPlaying
IsSoundValid
IsTextureValid
IsWaveValid
IsWindowFocused
IsWindowFullscreen
IsWindowHidden
IsWindowMaximized
IsWindowMinimized
IsWindowReady
IsWindowResized
IsWindowState
LoadAudioStream
LoadAutomationEventList
LoadCodepoints
LoadDirectoryFiles
LoadDirectoryFilesEx
LoadDroppedFiles
LoadFileData
LoadFileText
LoadFont
LoadFontData
LoadFontEx
LoadFontFromImage
LoadFontFromMemory
LoadImage
LoadImageAnim
LoadImageAnimFromMemory
LoadImageColors
LoadImageFromMemory
LoadImageFromScreen
LoadImageFromTexture
LoadImagePalette
LoadImageRaw
LoadMaterialDefault
LoadMaterials
LoadModel
LoadModelAnimations
LoadModelFromMesh
LoadMusicStream
LoadMusicStreamFromMemory
LoadRandomSequence
LoadRenderTexture
LoadShader
LoadShaderFromMemory
LoadSound
LoadSoundAlias
LoadSoundFromWave
LoadTexture
LoadTextureCubemap
LoadTextureFromImage
LoadUTF8
LoadVrStereoConfig
LoadWave
LoadWaveFromMemory
LoadWaveSamples
MakeDirectory
MaximizeWindow
MeasureText
MeasureTextEx
MemAlloc
MemFree
MemRealloc
MinimizeWindow
OpenURL
PauseAudioStream
PauseMusicStream
PauseSound
PlayAudioStream
PlayAutomationEvent
PlayMusicStream
PlaySound
PollInputEvents
RestoreWindow
ResumeAudioStream
ResumeMusicStream
ResumeSound
SaveFileData
SaveFileText
SeekMusicStream
SetAudioStreamBufferSizeDefault
SetAudioStreamCallback
SetAudioStreamPan
SetAudioStreamPitch
SetAudioStreamVolume
SetAutomationEventBaseFrame
SetAutomationEventList
SetClipboardText
SetConfigFlags
SetExitKey
SetGamepadMappings
SetGamepadVibration
SetGesturesEnabled
SetLoadFileDataCallback
SetLoadFileTextCallback
SetMasterVolume
SetMaterialTexture
SetModelMeshMaterial
SetMouseCursor
SetMouseOffset
SetMousePosition
SetMouseScale
SetMusicPan
SetMusicPitch
SetMusicVolume
SetPixelColor
SetRandomSeed
SetSaveFileDataCallback
SetSaveFileTextCallback
SetShaderValue
SetShaderValueMatrix
SetShaderValueTexture
SetShaderValueV
SetShapesTexture
SetSoundPan
SetSoundPitch
SetSoundVolume
SetTargetFPS
SetTextLineSpacing
SetTextureFilter
SetTextureWrap
SetTraceLogCallback
SetTraceLogLevel
SetWindowFocused
SetWindowIcon
SetWindowIcons
SetWindowMaxSize
SetWindowMinSize
SetWindowMonitor
SetWindowOpacity
SetWindowPosition
SetWindowSize
SetWindowState
SetWindowTitle
ShowCursor
StartAutomationEventRecording
StopAudioStream
StopAutomationEventRecording
StopMusicStream
StopSound
SwapScreenBuffer
TakeScreenshot
TextAppend
TextCopy
TextFindIndex
TextFormat
TextInsert
TextIsEqual
TextJoin
TextLength
TextReplace
TextSplit
TextSubtext
TextToCamel
TextToFloat
TextToInteger
TextToLower
TextToPascal
TextToSnake
TextToUpper
ToggleBorderlessWindowed
ToggleFullscreen
TraceLog
UnloadAudioStream
UnloadAutomationEventList
UnloadCodepoints
UnloadDirectoryFiles
UnloadDroppedFiles
UnloadFileData
UnloadFileText
UnloadFont
UnloadFontData
UnloadImage
UnloadImageColors
UnloadImagePalette
UnloadMaterial
UnloadMesh
UnloadModel
UnloadModelAnimation
UnloadModelAnimations
UnloadMusicStream
UnloadRandomSequence
UnloadRenderTexture
UnloadShader
UnloadSound
UnloadSoundAlias
UnloadTexture
UnloadUTF8
UnloadVrStereoConfig
UnloadWave
UnloadWaveSamples
UpdateAudioStream
UpdateCamera
UpdateCameraPro
UpdateMeshBuffer
UpdateModelAnimation
UpdateModelAnimationBones
UpdateMusicStream
UpdateSound
UpdateTexture
UpdateTextureRec
UploadMesh
WaitTime
WaveCopy
WaveCrop
WaveFormat
WindowShouldClose

Type Aliases§

AudioCallback
Camera
LoadFileDataCallback
LoadFileTextCallback
Quaternion
RenderTexture2D
SaveFileDataCallback
SaveFileTextCallback
Texture2D
TextureCubemap
TraceLogCallback
__builtin_va_list
__gnuc_va_list
va_list