Skip to content

Commit 126bae9

Browse files
committed
first commit
0 parents  commit 126bae9

15 files changed

Lines changed: 5602 additions & 0 deletions

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/" # Location of package manifests
6+
schedule:
7+
interval: "weekly"

.github/workflows/CI.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags: ['*']
7+
pull_request:
8+
workflow_dispatch:
9+
concurrency:
10+
# Skip intermediate builds: always.
11+
# Cancel intermediate builds: only if it is a pull request build.
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
14+
jobs:
15+
test:
16+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
17+
runs-on: ${{ matrix.os }}
18+
timeout-minutes: 60
19+
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
20+
actions: write
21+
contents: read
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
version:
26+
- '1'
27+
os:
28+
- ubuntu-latest
29+
- windows-latest
30+
- macos-latest
31+
arch:
32+
- x64
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: julia-actions/setup-julia@v2
36+
with:
37+
version: ${{ matrix.version }}
38+
arch: ${{ matrix.arch }}
39+
- uses: julia-actions/cache@v2
40+
- uses: julia-actions/julia-buildpkg@v1
41+
- uses: julia-actions/julia-runtest@v1

.github/workflows/CompatHelper.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: 0 0 1 * *
5+
workflow_dispatch:
6+
jobs:
7+
CompatHelper:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Pkg.add("CompatHelper")
11+
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12+
- name: CompatHelper.main()
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16+
run: julia -e 'using CompatHelper; CompatHelper.main()'

.github/workflows/TagBot.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: TagBot
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
7+
inputs:
8+
lookback:
9+
default: "3"
10+
permissions:
11+
actions: read
12+
checks: read
13+
contents: write
14+
deployments: read
15+
issues: read
16+
discussions: read
17+
packages: read
18+
pages: read
19+
pull-requests: read
20+
repository-projects: read
21+
security-events: read
22+
statuses: read
23+
jobs:
24+
TagBot:
25+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: JuliaRegistries/TagBot@v1
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
ssh: ${{ secrets.DOCUMENTER_KEY }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/Manifest*.toml

Artifacts.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[raylib-linux]
2+
arch = "x86_64"
3+
os = "linux"
4+
lazy = true
5+
git-tree-sha1 = "ba6fefde09a27f3b1bc714cdaa8712c141ad79c2"
6+
7+
[[raylib-linux.download]]
8+
url = "https://github.com/raysan5/raylib/releases/download/5.5/raylib-5.5_linux_amd64.tar.gz"
9+
sha256 = "3d95ef03d5b38dfa55c0a16ca122d382134b078f0e5b270b52fe7eae0549c000"
10+
11+
[raylib-macos]
12+
arch = "x86_64"
13+
os = "macos"
14+
lazy = true
15+
git-tree-sha1 = "404d4bd22115288fa16084c386fbaf7dfa236d77"
16+
17+
[[raylib-macos.download]]
18+
url = "https://github.com/raysan5/raylib/releases/download/5.5/raylib-5.5_macos.tar.gz"
19+
sha256 = "930c67b676963c6cffbd965814664523081ecbf3d30fc9df4211d0064aa6ba39"
20+

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 imohag9 <souidi.hamza90@gmail.com> and contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Project.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name = "RaylibWrapper"
2+
uuid = "94d0a5c0-cbff-40d6-acf3-68cde29ba2e2"
3+
version = "0.1.0"
4+
authors = ["imohag9 <souidi.hamza90@gmail.com> and contributors"]
5+
6+
[deps]
7+
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
8+
LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
9+
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
10+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
11+
ZipArchives = "49080126-0e18-4c2a-b176-c102e4b3760c"
12+
13+
[compat]
14+
Downloads = "1.6.0"
15+
LazyArtifacts = "1.11.0"
16+
Libdl = "1.11.0"
17+
Pkg = "1.12.0"
18+
ZipArchives = "2.6.0"
19+
julia = "1.11"

README.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# RaylibWrapper [![Build Status](https://github.com/imohag9/RaylibWrapper.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/imohag9/RaylibWrapper.jl/actions/workflows/CI.yml?query=branch%3Amain) [![Aqua](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
2+
3+
4+
`RaylibWrapper.jl` provides comprehensive, low-level Julia bindings for the popular [Raylib](https://www.raylib.com/) library, **version 5.5**. Raylib is a simple and easy-to-use library designed to make video game programming enjoyable and accessible. This wrapper allows you to leverage the full power and simplicity of Raylib directly within the Julia programming language.
5+
6+
## Features
7+
8+
* **Comprehensive API Coverage:** Wraps a vast portion of the Raylib C API, giving you access to core functions, 2D/3D graphics, audio processing, text rendering, input handling, and much more.
9+
* **Zero-Overhead Bindings:** Provides a highly efficient wrapper that calls directly into the C library with minimal overhead, ensuring great performance.
10+
* **Cross-Platform:** Works seamlessly on 64-bit Windows, macOS, and Linux.
11+
* **Hassle-Free Installation:** Uses Julia's built-in `LazyArtifacts` system to automatically download and manage the correct Raylib binaries for your platform. No manual installation of Raylib is required!
12+
13+
14+
## Installation
15+
16+
You can install `RaylibWrapper.jl` directly from the Julia General registry. Open the Julia REPL, press `]` to enter Pkg mode, and run:
17+
18+
```julia
19+
pkg> add RaylibWrapper
20+
```
21+
22+
## Quick Start: Create Your First Window
23+
24+
Here is a simple example to get you started. This code initializes a window, draws text on the screen, and runs a main loop until the user closes the window.
25+
26+
```julia
27+
using RaylibWrapper
28+
29+
# Define window dimensions
30+
const SCREEN_WIDTH = 800
31+
const SCREEN_HEIGHT = 450
32+
33+
function main()
34+
# Initialize the window and set the target framerate
35+
InitWindow(SCREEN_WIDTH, SCREEN_HEIGHT, "Hello Raylib from Julia!")
36+
SetTargetFPS(60)
37+
38+
# --- Main Game Loop ---
39+
# The loop continues until the user presses the ESC key or closes the window
40+
while !WindowShouldClose()
41+
# --- Drawing Phase ---
42+
BeginDrawing()
43+
44+
# Clear the background to a specific color (Raylib's RAYWHITE)
45+
ClearBackground(RAYWHITE)
46+
47+
# Draw the text in the center of the screen
48+
DrawText("Congrats! You created your first window in Julia!", 140, 200, 20, MAROON)
49+
50+
# End the drawing phase
51+
EndDrawing()
52+
end
53+
54+
# --- De-Initialization ---
55+
# Close the window and release all resources
56+
CloseWindow()
57+
end
58+
59+
# Run the main function to start the application
60+
main()
61+
```
62+
63+
This simple example demonstrates the basic structure of a Raylib application in Julia. For more advanced examples, please check the official Raylib examples,or the examples implemented in this package as the function names and logic translate directly using this wrapper.
64+
65+
## Documentation
66+
67+
The official documentation provides a complete list of all wrapped functions and types.
68+
* **[Raylib Cheatsheet](https://www.raylib.com/cheatsheet/cheatsheet.html)** — Documentation for the latest released version.
69+
70+
71+
## Contributing
72+
73+
Contributions are welcome and greatly appreciated! If you find a bug, have a feature request, or would like to contribute to the code, please feel free to open an issue or pull request on the GitHub repository.
74+
75+
## Acknowledgements
76+
77+
This package would not be possible without the amazing work of **Ramon Santamaria** [@raysan5](https://github.com/raysan5) and all the contributors to the [Raylib](https://github.com/raysan5/raylib) project.
78+
79+
## License
80+
81+
This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.

src/RaylibWrapper.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module RaylibWrapper
2+
3+
include("lib.jl")
4+
include("low_level_wrapper.jl")
5+
6+
7+
end

0 commit comments

Comments
 (0)