libsdl-org / libsdl-org/setup-sdl
Build stub library from dynapi?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 41
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
This might be a completely stupid idea (and maybe I said it before?), but I was thinking:
For projects that just want to make sure they build on GitHub Actions and don't care beyond that, we could maybe do this:
- Grab a copy of the SDL sources.
- Build with a file that turns SDL/src/dynapi/SDL_dynapi_procs.h into a complete library in one source file
- Compile that one source file into a library that has all the right symbols but no actual code, install that and the public headers.
- Project on GitHub Actions compiles against the headers and links against this stub library.
The benefit is that building SDL from scratch is (presumably) significantly faster and doesn't need any special configuration beyond access to a C compiler, and doesn't need extra tools and dependencies installed. The downside is obviously this won't actually function as a library if the project wants to run tests or whatnot, so this would have to be an option and not the default.
The source code to compile might look as simple as:
#include <SDL3/SDL.h>
#define SDL_DYNAPI_PROC(rettype,fnname,params,args,retn) \
rettype fnname params { retn 0; }
#include "SDL_dynapi_procs.h"
...is this a terrible idea?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with SDL/src/dynapi/SDL_dynapi_procs.h and the public SDL headers, then inspect how setup-sdl currently exposes SDL to GitHub Actions. Done would be an optional path that builds a symbol-only library from those sources and headers, while leaving normal functional SDL builds unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, github-actions
- Domain
- build-system, ci-cd
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100