Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with delta #190

Merged
merged 235 commits into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
235 commits
Select commit Hold shift + click to select a range
9861415
Started on raylib 4.0, builds and runs most samples in both windows a…
Rover656 Jan 25, 2022
864c0c0
Fix non-async build for samples, allows audio to work
Rover656 Jan 26, 2022
0765bda
Read desc
Rover656 Jan 26, 2022
d6455cd
Fixed a couple of things
Rover656 Jan 29, 2022
6b0d5d8
Merge pull request #114 from Rover656/port-4.0
Dacode45 Feb 5, 2022
d72bc65
4.2.0 intinal commit
bitten2up Oct 21, 2022
879065a
updated submodlule
bitten2up Oct 21, 2022
a21716d
removed get_ray_collision_model due to it being removed from rylib
bitten2up Oct 21, 2022
b42fafd
replaced GetDroppedFiles with LoadDroppedFiles
bitten2up Oct 21, 2022
1f46c37
AA
bitten2up Oct 21, 2022
7023d3a
yeah that nor exsist anymore
bitten2up Oct 21, 2022
5e04ab4
aa
bitten2up Oct 21, 2022
8a262be
saninty 0%
bitten2up Oct 21, 2022
0deed5b
ok now we got a compiling build, now to add the commands
bitten2up Oct 21, 2022
199f352
update dropped files nameing
bitten2up Oct 21, 2022
a07eada
set_window_opcity implemented
bitten2up Oct 21, 2022
da84975
reminder
bitten2up Oct 21, 2022
b169094
reminders
bitten2up Oct 21, 2022
915efde
update readme
bitten2up Oct 21, 2022
3bb1774
oops how did i miss that
bitten2up Oct 21, 2022
1bb5027
AAAAAAAAAA
bitten2up Oct 21, 2022
5bbf078
fixed my lazyness with lazyness
bitten2up Oct 22, 2022
e00b003
add mouse wheel move v and updated documentation
bitten2up Oct 22, 2022
7d7ab57
oops i messed that up, it is a vector
bitten2up Oct 22, 2022
e73346e
Merge
Dacode45 Nov 13, 2022
b20d463
building raylib-sys
Dacode45 Nov 13, 2022
74aae17
Raylib building
Dacode45 Nov 13, 2022
eb2d40f
adding ci
Dacode45 Nov 13, 2022
5464ae2
just windows right now
Dacode45 Nov 13, 2022
1c2a8ea
Add binding for `LoadWaveFromMem()`
BlueStaggo Nov 19, 2022
face90e
Merge remote-tracking branch 'origin/master' into 4.5.0
bitten2up Dec 19, 2022
b8f4a42
fix merge requests
bitten2up Dec 19, 2022
c49c376
Merge commit '5464ae2761958a478c88cd8e0682556ca1fb8f41' into 4.5.0
bitten2up Dec 19, 2022
0803536
g
bitten2up Dec 19, 2022
5403e63
updated to reflect the removal of part of DrawTexture*
bitten2up Dec 19, 2022
7305502
Fix examples
bitten2up Dec 19, 2022
4beb0a2
tried to fix showcase, failed tho
bitten2up Dec 19, 2022
5f0f6f0
Fix enum member redefinition errors
BlueStaggo Dec 28, 2022
abb6074
impl IntoCStr for &str
BlueStaggo Dec 28, 2022
c118077
Fixed the IntoCStr
BlueStaggo Dec 28, 2022
bf149da
Fix IntoCStr again
BlueStaggo Dec 28, 2022
fec4395
Yet again, trying to fix it.
BlueStaggo Dec 28, 2022
b4210b9
Just leave the AsRef<str>
BlueStaggo Dec 28, 2022
ef5f15f
Well that was stupid
BlueStaggo Dec 28, 2022
bcc6212
Merge pull request #2 from BlueStaggo/4.5.0
bitten2up Jan 30, 2023
95fb926
update to latest 4.5.0
bitten2up Mar 17, 2023
33bdebd
fix broken build
bitten2up Mar 17, 2023
133431e
Merge branch 'deltaphc:master' into 4.5.0
bitten2up Mar 17, 2023
a0fe4a6
add setWindowIcons, to person reviewing this, look through code as it…
bitten2up Mar 17, 2023
610094f
Merge branch '4.5.0' of https://github.com/litten2up/raylib-rs into 4…
bitten2up Mar 17, 2023
4e36ab4
readd cli
bitten2up Mar 17, 2023
2514f00
safer
bitten2up Mar 18, 2023
07b1042
update to the release version of 4.5.0
bitten2up Mar 18, 2023
57f3fc6
4.6.0
bitten2up Oct 8, 2023
5edb68e
Update build.rs: Remove ninja build
jestarray Oct 18, 2023
eb3bc34
ok at this point ill fix it myself
bitten2up Oct 18, 2023
4cc653f
ignore the example comments
bitten2up Oct 18, 2023
234081b
Merge pull request #5 from jestarray/patch-2
bitten2up Oct 19, 2023
725bffe
Merge remote-tracking branch 'origin/4.5.0' into 4.6.0
bitten2up Dec 13, 2023
13a3cec
Fix broken stuff
bitten2up Dec 13, 2023
5f59df8
ok idk if it works
bitten2up Dec 13, 2023
2c390b2
Update .gitmodules
bitten2up Dec 14, 2023
60cf66a
remove deleted function
bitten2up Dec 14, 2023
e80e0ce
Updates from_euler parameter names to match raymath's QuaternionFromE…
LoparPanda Jan 9, 2024
3402344
Merge pull request #6 from LoparPanda/yrp
bitten2up Jan 12, 2024
548e12d
better wasm command
IoIxD Jan 24, 2024
2c51eda
forgot gl_enable_get_proc_address
IoIxD Jan 24, 2024
ac3b15e
load text from memory
IoIxD Jan 24, 2024
3f9208f
Added rotation to the Vector2 implementation.
Jankoy Jan 30, 2024
e16de3a
simplify load_image_from_mem function
JulianGmp Jun 21, 2022
36f36c8
update doc comment for load_image_from_mem
JulianGmp Jan 31, 2024
f2b8129
Merge pull request #16 from JulianGmp/refactor_load_image_from_mem
bitten2up Jan 31, 2024
71ebe7e
[camera] update_camera should take CameraMode, not i32
IoIxD Jan 31, 2024
eac8b16
[tests] re-enable raylib-test but comment out the image tests until w…
IoIxD Jan 31, 2024
aaa6b71
[audio, tests] removed export_wave_as_code because a segfault was fou…
IoIxD Feb 1, 2024
ea524cc
[roadmap] removed roadmap. Everything within it has been completed fo…
IoIxD Feb 2, 2024
13b6be9
[core] added no-arg functions + one primitive function. added feature…
IoIxD Feb 2, 2024
5438c93
[tests] added test for the new custom frame handling mode
IoIxD Feb 2, 2024
84bd30f
[window] added set_window_max_size
IoIxD Feb 2, 2024
97c8f9f
[data] added export_data_as_code
IoIxD Feb 2, 2024
12b1fc0
[tests] add test for export_data_as_code
IoIxD Feb 2, 2024
b5e2562
[tests] export_data_as_code test hadn't been updated after i moved ex…
IoIxD Feb 2, 2024
c769ff1
[file] added application_directory, get_file_length, and is_path_file
IoIxD Feb 2, 2024
9b99e61
[tests] test for new file functions
IoIxD Feb 2, 2024
04f2ee4
[data] added base64 functions
IoIxD Feb 2, 2024
78f2a5c
[tests] added base64 tests
IoIxD Feb 2, 2024
4bc07c4
[input] added set_gamepad_mappings
IoIxD Feb 2, 2024
d4f94c5
[drawing] added spline functions and draw_poly_lines_ex
IoIxD Feb 2, 2024
8992dbf
[tests] added spline tests. added 3D test for later.
IoIxD Feb 2, 2024
7d4835d
[data] fix memory out of bounds in base 64 functions
IoIxD Feb 2, 2024
f7d1f70
[drawing] forgot comments for the spline functions
IoIxD Feb 2, 2024
23c302d
[collision] added collision functions
IoIxD Feb 2, 2024
c3f6bfc
[textures] added new image methods
IoIxD Feb 3, 2024
a4c924e
[tests] added new tests for the image methods
IoIxD Feb 3, 2024
223fe29
[texture] forgot to comment new image functions.
IoIxD Feb 3, 2024
b48e75a
[color] new color functions. deprecated fade which is being replaced …
IoIxD Feb 3, 2024
f0bb300
[texture] bound is_ready functions for image/texture
IoIxD Feb 3, 2024
63f640b
[texture] render texture has its own function for determining readine…
IoIxD Feb 3, 2024
142885b
[image] added image generation functions
IoIxD Feb 3, 2024
89fae8e
[test] added tests for the image generation functions
IoIxD Feb 3, 2024
d647d4f
[audio] added 'ready' functions for audio stuff
IoIxD Feb 3, 2024
bde50d2
[text] bound IsFontReady
IoIxD Feb 3, 2024
ddb8ad1
[audio] audio stuff
IoIxD Feb 3, 2024
52bc5c8
[project] add rust-toolchain file for successful CI builds. maybe dis…
IoIxD Feb 3, 2024
3f06d90
[project] set the version in the rust-toolchain file to something con…
IoIxD Feb 3, 2024
ba715e8
[project] removed the pointer_is_aligned requirement because it turns…
IoIxD Feb 3, 2024
d6038fe
[project] remove rust-toolchain after concluding its unnecessary
IoIxD Feb 3, 2024
37fc5c4
[general] removed some cast redundancy
IoIxD Feb 3, 2024
1dbe644
[general] allow the majority of the repo to build on stable. test req…
IoIxD Feb 3, 2024
1161641
[math] ci failing due to duplicate nalgebra_interop
IoIxD Feb 3, 2024
287060e
[general] more ci fixes
IoIxD Feb 3, 2024
e893ed7
[general] serde CI fixes
IoIxD Feb 3, 2024
ac7d8b8
[ci] try to see if i can ensure the CI uses the raylib submodule at v…
IoIxD Feb 3, 2024
acdcab3
[ci] put that checkout line under all submodule updates
IoIxD Feb 3, 2024
b0579f1
[ci] changed example to one that doesn't crash
IoIxD Feb 3, 2024
a444566
[ci] add glfw to apt-get command
IoIxD Feb 3, 2024
ae55161
[ci] wayland
IoIxD Feb 3, 2024
0ca2fc3
[ci] wrong wayland package sorry i don't use ubuntu
IoIxD Feb 3, 2024
d78e3c5
[ci] added regular linux test
IoIxD Feb 3, 2024
c670eec
[clippy] fixed some things that were setting off clippy
IoIxD Feb 3, 2024
89d516d
[ci] remove linux test
IoIxD Feb 3, 2024
5e27033
[general] made cargo fmt happy
IoIxD Feb 3, 2024
ddb8a7e
Merge pull request #18 from IoIxD/5.0.0-p1
IoIxD Feb 4, 2024
52442b0
Merge pull request #11 from Jankoy/patch-1
IoIxD Feb 6, 2024
3af430d
[misc] remove duplicate get_random_value func
IoIxD Feb 6, 2024
f34d537
[misc, tests] bound LoadRandomSequence/UnloadRandomSequence. nade a s…
IoIxD Feb 6, 2024
c391a33
[misc] added doc comment for random sequence
IoIxD Feb 6, 2024
ae0e7f0
[files] added FilePathList and the functions for creating it.
IoIxD Feb 6, 2024
2c6eb18
[files] FilePathList::len -> FilePathList::count because i change my …
IoIxD Feb 6, 2024
117479d
[files] removed unused imports
IoIxD Feb 6, 2024
b8c883c
[prelude] added missing modules
IoIxD Feb 6, 2024
e00ee0c
[file] nearly forgot impl for DroppedFileList
IoIxD Feb 6, 2024
0a6819f
[file] bound IsFileExtension
IoIxD Feb 6, 2024
db2d84c
[macros] added variation of make_thin_wrapper that doesn't implement …
IoIxD Feb 6, 2024
e339380
[automation] bound the automation functions
IoIxD Feb 6, 2024
edb226c
[tests] added test for automation
IoIxD Feb 6, 2024
99f4701
[samples] updated first person sample to be correct
IoIxD Feb 6, 2024
e505ce0
[textures] fix merge conflict
IoIxD Feb 6, 2024
9f1ba37
[drawing] added DrawTextPro
IoIxD Feb 6, 2024
bdff186
[general] ran cargo fmt to make the formatter happy
IoIxD Feb 6, 2024
316cce2
[build] support jpg
IoIxD Feb 6, 2024
e7c3b9d
[build] forgot a semicolon :P
IoIxD Feb 7, 2024
a777b4f
[math] range as argument in clamp. fixes #17
IoIxD Feb 7, 2024
c837d6c
[math] range in Vector3::clamp as argument.
IoIxD Feb 7, 2024
4e86eb4
Fixes samples and moves to example directory
Dacode45 Feb 7, 2024
53ff709
Merge branch 'deltaphc:master' into master
IoIxD Feb 7, 2024
c05fb2d
[general] update raylib cargo.toml to not worry about the examples on…
IoIxD Feb 9, 2024
5987669
[automation] forgot to add events_raw function but removed the mentio…
IoIxD Feb 9, 2024
559f07e
[file] fixed comment
IoIxD Feb 9, 2024
156e233
[file, tests] changed all the file functions to not return errors. we…
IoIxD Feb 9, 2024
108044f
[file] forgot to apply previous principle to is_file_extension
IoIxD Feb 9, 2024
3d0620a
[samples] undid previous fix to allow another PR doing the fix and mo…
IoIxD Feb 9, 2024
88c7dc0
[raylib] removed commented-out reference to nobuild feature flag whic…
IoIxD Feb 9, 2024
ec2d2f1
Merge pull request #21 from IoIxD/5.0.0-p2
IoIxD Feb 9, 2024
5cabf74
Merge branch '5.0.0' into port-examples
IoIxD Feb 9, 2024
a0bf344
*mut -> &mut
IoIxD Feb 9, 2024
ade7da0
Merge pull request #23 from Dacode45/port-examples
IoIxD Feb 9, 2024
595df49
[text] moved is_ready to trait, added export_as_code
IoIxD Feb 9, 2024
d181b58
[tests] export font test
IoIxD Feb 9, 2024
a351f4b
[text] added get_glyph_info. moved a bunch of functions that should h…
IoIxD Feb 9, 2024
db13b20
[text] set_text_line_spacing
IoIxD Feb 9, 2024
b40d6a3
[drawing] mesh functions
IoIxD Feb 9, 2024
f770cb0
[sys, drawing, test] tried to get raymath to bind. updated gen_mesh. …
IoIxD Feb 9, 2024
9d86752
[models] export_mesh -> export
IoIxD Feb 9, 2024
62a44d7
[callbacks, test] added code for setting trace log callbacks
IoIxD Feb 9, 2024
648a26c
[callbacks, test] added file callbacks and audio callback (untested)
IoIxD Feb 10, 2024
78cac14
[general] moved log level functions to under RaylibHandle. added a fu…
IoIxD Feb 10, 2024
c791f0b
[callbacks] removed unused variables
IoIxD Feb 10, 2024
884a92d
publically export __va_list_tag in consts
IoIxD Feb 10, 2024
e89b0e8
[ci] build before cargo test because for some reason ci doesn't see _…
IoIxD Feb 10, 2024
c5ab58e
[callbacks] define __va_list_tag as from raylib-sys?
IoIxD Feb 10, 2024
534e419
[consts] remove __va_list_tag
IoIxD Feb 10, 2024
caebb81
[ci] remove cd raylib-test for docs
IoIxD Feb 10, 2024
270f126
[ci] remove nobuild from the rust.yml
IoIxD Feb 10, 2024
500180c
[callbacks] define __va_list_arg for all supported platforms
IoIxD Feb 10, 2024
808dd33
[ci] ci does not support gl and cannot do the unit tests
IoIxD Feb 10, 2024
c8f7547
[callbacks] removed unnecessary code
IoIxD Feb 11, 2024
45cb641
[callbacks] fixed undefined behavior. corrected sample
IoIxD Feb 12, 2024
7f6e36d
[audio] bound remaining audio functions
IoIxD Feb 13, 2024
8ebb573
[camera] bound remaining camera functions
IoIxD Feb 13, 2024
f38c44c
Merge pull request #25 from IoIxD/5.0.0-p3
IoIxD Feb 13, 2024
dfab52f
[builder] move the function that sets the log level before the initia…
IoIxD Feb 21, 2024
4a64022
Merge pull request #28 from IoIxD/loglevel-before
IoIxD Feb 26, 2024
33a36bb
mkbranch
IoIxD Feb 26, 2024
b322cb2
rm mkbranch
IoIxD Feb 26, 2024
a0d593d
[text, tests] 'added' codepoints, and tests for the functions that we…
IoIxD Feb 27, 2024
5bc096d
[mesh] added unsafe bindings to UploadMesh and UploadMeshBuffer. not …
IoIxD Feb 27, 2024
d2b242d
[audio] begun audio refactor.
IoIxD Feb 27, 2024
3a79258
[audio] add graceful error for when user tries to initialize audio de…
IoIxD Feb 27, 2024
d9d67d4
[audio] further doc comment for RaylibAudio
IoIxD Feb 27, 2024
bf84a84
[core] don't need IS_INITIALIZED, ffi::IsWindowReady exists
IoIxD Feb 27, 2024
5ca7f70
[core] drop impl for RaylibHandle had an accidental exclamation point…
IoIxD Feb 27, 2024
9121953
[audio] change comment explaining why we're not adding UpdateSound yet
IoIxD Feb 27, 2024
6fa8d77
[text] add draw_text_codepoints
IoIxD Feb 27, 2024
76ab939
[text] make draw_text_codepoints take font as argument instead of jus…
IoIxD Feb 27, 2024
29bbe5d
[audio] Removed SoundType, it had went unused and presented a memory …
IoIxD Mar 4, 2024
e77d642
[audio] resolved comments on pr
IoIxD Mar 4, 2024
8e4c19c
changed RaylibAudio::new back to RaylibAudio::init_audio_device
IoIxD Mar 4, 2024
94ba633
[input] assorted gamepad fixes
IoIxD Mar 7, 2024
29577fb
[build] accidentally left in feature flags from when i was trying to …
IoIxD Mar 7, 2024
d790832
Merge pull request #29 from IoIxD/5.0.0-p4
IoIxD Mar 17, 2024
a75b584
Bind GetMonitorPosition
balt-dev Mar 20, 2024
87090b9
Merge pull request #30 from balt-dev/master
IoIxD Mar 21, 2024
cab61f4
Apply suggestions from Dacode's code review
IoIxD Mar 29, 2024
20ddd77
fix(core/callbacks): bad __va_list_tag
mogery Apr 3, 2024
1cdda71
fix(core): bad port to using AsRef<Path>
mogery Apr 3, 2024
065b5ae
general: fix path issues to make 5.0.0usable again
IoIxD Apr 3, 2024
c7d905e
Update automation.rs
IoIxD Apr 4, 2024
81ce381
automation: forgot to import PathBuf
IoIxD Apr 4, 2024
0207bfb
Merge pull request #33 from mogery/5.0.0
IoIxD Apr 4, 2024
720865c
readme: adjust readme
IoIxD Apr 10, 2024
626816b
raylib: add gl feature flags
IoIxD Apr 10, 2024
3bc6ba0
Merge branch '5.0.0' into 5.0.0-glfeatures-round4
IoIxD Apr 10, 2024
9264b13
readme: realized i was about to revert something in the readme by acc…
IoIxD Apr 10, 2024
2152251
data: had also accidentally overwritten a change to data.rs
IoIxD Apr 10, 2024
299d347
automation: duplicate import
IoIxD Apr 10, 2024
7998f2f
raylib/cargo, readme: mirror gl feature flags from raylib-sys, bump r…
IoIxD Apr 10, 2024
2ddadf5
Merge branch 'master' into 5.0.0
IoIxD Apr 10, 2024
3fafcfc
Add floppy sample (#38)
ShivanshuKantPrasad Apr 11, 2024
bf3fbf3
Add floppy example, port older examples to newer api (#39)
ShivanshuKantPrasad May 7, 2024
82a8ceb
Fixed camera2D.rs example (#44)
o-dka May 7, 2024
11bc751
Assorted fixes (#31)
IoIxD May 7, 2024
4cf1bdb
5.0.0 Merge Conflict fix (#45)
IoIxD May 7, 2024
f454539
5.0.0: Fixed merge conflict, again. (#46)
IoIxD May 7, 2024
165dc4e
moved samples back into root to fix a merge conflict (#47)
IoIxD May 7, 2024
1950b2a
Merge branch 'master' into 5.0.0
IoIxD May 7, 2024
66e0ca0
readme: update "supported platforms"; raspi no longer a seperate targ…
IoIxD May 7, 2024
2de6fde
readme: android is not yet a supported platform
IoIxD May 7, 2024
50a906f
cargo: change raylib repo to this one
IoIxD May 7, 2024
a6a7931
cargo: update raylib-sys cargo
IoIxD May 7, 2024
d53d142
cargo: update raylib-test cargo for consistency (even though it's not…
IoIxD May 7, 2024
6bad6fd
cargo: update samples cargo.toml for consistency.
IoIxD May 7, 2024
b8824d1
cargo: update showcase cargo.toml
IoIxD May 7, 2024
2140da7
Merge pull request #15 from raylib-rs/5.0.0
Dacode45 May 9, 2024
2b9533c
raylib/cargo: we don't need tcod in the root cargo.toml, its only use…
IoIxD May 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI

on:
pull_request:
push:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ubuntu-latest-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Setup git submodules
run: git submodule init; git submodule update
- name: Install alsa, udev, glfw3, sdl, and wayland
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libglfw3-dev libwayland-dev libsdl2-dev
- name: Run doc tests with all features (this also compiles README examples)
run: cargo test --doc --all-features
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ubuntu-latest-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
override: true
- name: Setup git submodules
run: git submodule init; git submodule update
- name: Install alsa, udev, glfw3, sdl, and wayland
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libglfw3-dev libwayland-dev libsdl2-dev
- name: Run clippy
run: cargo clippy --workspace --all-targets --all-features
- name: Check format
run: cargo fmt --all -- --check
14 changes: 8 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Build
run: cd raylib && cargo build --verbose --features nobuild
- uses: actions/checkout@v1
- name: Setup git submodules
run: git submodule init; git submodule update
- name: Install alsa, udev, glfw3, sdl, and wayland
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libglfw3-dev libwayland-dev libsdl2-dev
- name: Build
run: cd raylib && cargo build --verbose
# - name: Run tests [Requires window system]
# run: cargo test -p raylib-test --verbose
# run: cargo test -p raylib-test --verbose
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "raylib-sys/raylib"]
path = raylib-sys/raylib
url = https://github.com/raysan5/raylib
branch = "5.0"
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[workspace]
members = ["raylib", "raylib-sys", "raylib-test", "samples", "showcase"]
members = ["raylib", "raylib-sys"]
exclude = ["raylib-test"]
52 changes: 27 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
![logo](logo/raylib-rust_256x256.png)

![rust](https://img.shields.io/badge/rust-1.31+-orange.svg?style=flat-square&logo=rust)
<p align="center">
![rust](https://img.shields.io/badge/rust-1.77+-orange.svg?style=flat-square&logo=rust)
[![crates.io](https://img.shields.io/crates/v/raylib.svg?style=flat-square)](https://crates.io/crates/raylib)
[![docs](https://docs.rs/raylib/badge.svg)](https://docs.rs/raylib)
[discord](https://discord.gg/VkzNHUE)
[![discord](https://img.shields.io/discord/426912293134270465)](https://discord.gg/VkzNHUE)

</p>

# NOTE 4.x version in progress.
<table border="0">
<tr>
<td>

Raylib 4.2 is currently a work in progress. In the meantime you can use a fork: https://github.com/bitten2up/raylib-rs
![logo](logo/raylib-rust_256x256.png)

Add this to your Cargo.toml
```toml
[dependencies.raylib]
version = "5.0.0"
git = "https://github.com/bitten2up/raylib-rs"
branch = "5.0.0"
```
</td>
<td>

# raylib-rs

raylib-rs is a Rust binding for [raylib](http://www.raylib.com/) 3.5. It currently targets the _stable_ Rust toolchain, version 1.31 or higher.
raylib-rs is a Rust binding for [raylib](http://www.raylib.com/) 5.0. It currently targets the _stable_ Rust toolchain, version 1.77 or higher.

Please checkout the showcase directory to find usage examples!

Though this binding tries to stay close to the simple C API, it makes some changes to be more idiomatic for Rust.

</td>
</tr>
</table>


- Resources are automatically cleaned up when they go out of scope (or when `std::mem::drop` is called). This is essentially RAII. This means that "Unload" functions are not exposed (and not necessary unless you obtain a `Weak` resource using make_weak()).
- Most of the Raylib API is exposed through `RaylibHandle`, which is for enforcing that Raylib is only initialized once, and for making sure the window is closed properly. RaylibHandle has no size and goes away at compile time. Because of mutability rules, Raylib-rs is thread safe!
- A `RaylibHandle` and `RaylibThread` are obtained through `raylib::init_window(...)` or through the newer `init()` function which will allow you to `build` up some window options before initialization (replaces `set_config_flags`). RaylibThread should not be sent to any other threads, or used in a any syncronization primitives (Mutex, Arc) etc.
Expand All @@ -34,18 +37,16 @@ Though this binding tries to stay close to the simple C API, it makes some chang
- `Font::from_data`, `Font::set_chars`, and `Font::set_texture` methods were added to create a `Font` from loaded `CharInfo` data.
- `SubText` and `FormatText` are omitted, and are instead covered by Rust's string slicing and Rust's `format!` macro, respectively.

**Disclaimer: I created this binding as a way to learn Rust. There may be some things I can do better, or make more ergonomic for users. Feel free to make suggestions!**

# Installation

## Supported Platforms

| API | Windows | Linux | macOS | Web | Android | Raspberry Pi |
| ------ | ------------------ | ------------------ | ------------------ | -------------- | ------- | ------------ |
| core | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :construction: | | |
| rgui | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | |
| physac | :construction: | :construction: | :construction: | | | |
| rlgl | :heavy_check_mark: | :x: | :x: | | | |
| API | Windows | Linux | macOS | Web | Android |
| ------ | ------------------ | ------------------ | ------------------ | -------------- | ------- |
| core | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |
| rgui | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :x: |
| physac | :construction: | :construction: | :construction: | | :x: |
| rlgl | :heavy_check_mark: | :x: | :x: | | :x: |

## Build Dependencies

Expand All @@ -56,7 +57,7 @@ Follow instructions for building raylib for your platform [here](https://github.

```toml
[dependencies]
raylib = { version = "3.7" }
raylib = { version = "5.0" }
```

2. Start coding!
Expand All @@ -81,10 +82,11 @@ fn main() {

# Tech Notes

- Structs holding resources have RAII/move semantics, including: `Image`, `Texture2D`, `RenderTexture2D`, `Font`, `Mesh`, `Shader`, `Material`, `Model`, `Wave`, `Sound`, `Music`, and `AudioStream`.
- Structs holding resources have RAII/move semantics, including: `Image`, `Texture2D`, `RenderTexture2D`, `Font`, `Mesh`, `Shader`, `Material`, and `Model`.
- `Wave`, `Sound`, `Music`, and `AudioStream` have lifetimes bound to `AudioHandle`.
- Functions dealing with string data take in `&str` and/or return an owned `String`, for the sake of safety. The exception to this is the gui draw functions which take &CStr to avoid per frame allocations. The `rstr!` macro helps make this easy.
- In C, `LoadFontData` returns a pointer to a heap-allocated array of `CharInfo` structs. In this Rust binding, said array is copied into an owned `Vec<CharInfo>`, the original data is freed, and the owned Vec is returned.
- In C, `GetDroppedFiles` returns a pointer to an array of strings owned by raylib. Again, for safety and also ease of use, this binding copies said array into a `Vec<String>` which is returned to the caller.
- In C, `LoadDroppedFiles` returns a pointer to an array of strings owned by raylib. Again, for safety and also ease of use, this binding copies said array into a `Vec<String>` which is returned to the caller.
- I've tried to make linking automatic, though I've only tested on Windows 10, Ubuntu, and MacOS 15. Other platforms may have other considerations.
- OpenGL 3.3, 2.1, and ES 2.0 may be forced via adding `["opengl_33"]`, `["opengl_21"]` or `["opengl_es_20]` to the `features` array in your Cargo.toml dependency definition.

Expand Down
Loading
Loading