nbody simulation in C using raylib
- C 80%
- Lua 10.2%
- GLSL 9.8%
|
|
||
|---|---|---|
| .claude | ||
| src | ||
| .clang-format | ||
| .clangd | ||
| .gitignore | ||
| README.md | ||
| xmake.lua | ||
nbody
nbody simulator in C using Raylib.
Development
Adding packages
xmake require raylib
Then both of these lines are needed in xmake.lua:
add_requires("raylib") -- declare the dependency
target("myproject")
set_kind("binary")
add_files("src/*.c")
add_packages("raylib") -- ← wire it to your target
Building & running
xmake # build
xmake run # run
xmake f -m debug # switch to debug build
xmake f -m release # switch to release build
xmake clean # clean build artifacts
Editor / LSP
Generate compile_commands.json so clangd knows about your includes and packages:
xmake project -k compile_commands
Re-run this whenever you change xmake.lua (add packages, change flags, etc.).
Package management
xmake require --list # list installed packages
xmake require --info raylib # details: version, path, flags
xmake require --clean # remove unused packages
Packages are cached globally at ~/.xmake/packages/