No emscripten port provides raylib — emcc --show-ports offers contrib.glfw3
and nothing else nearby — so build-web.sh clones raylib at the 5.5 tag and
compiles its seven modules with -DPLATFORM_WEB -DGRAPHICS_API_OPENGL_ES2 into
one archive under vendor/raylib/web, which is gitignored along with the
checkout it came from.
5.5 because that is the tag whose .so.550 the host links. raylib.flan carries
raylib's struct layouts and enum values, and two targets built from different
raylibs would disagree about them without saying so.
rglfw.c is not among the modules: the web platform uses emscripten's own GLFW
port, which is why link carries @web -sUSE_GLFW=3. No headers are installed,
for the same reason the host build needs none — the generated shim declares
the prototypes it uses.
link now names the host library under @native and the archive under @web,
through ${FLAN_RAYLIB_WEB}, so a web build with the variable unset is refused
with the name of the variable rather than a page of undefined GLFW symbols.
The one thing this costs: a wasi build that reaches raylib now fails on
undefined symbols instead of on the missing -l:libraylib.so.550.
53 lines
866 B
Plaintext
53 lines
866 B
Plaintext
*.annot
|
|
*.cmo
|
|
*.cma
|
|
*.cmi
|
|
*.a
|
|
*.o
|
|
*.cmx
|
|
*.cmxs
|
|
*.cmxa
|
|
|
|
# ocamlbuild working directory
|
|
_build/
|
|
|
|
# ocamlbuild targets
|
|
*.byte
|
|
*.native
|
|
|
|
# oasis generated files
|
|
setup.data
|
|
setup.log
|
|
|
|
# Merlin configuring file for Vim and Emacs
|
|
.merlin
|
|
|
|
# Dune generated files
|
|
*.install
|
|
|
|
# Local OPAM switch
|
|
_opam/
|
|
|
|
# VSCode settings folder
|
|
.vscode
|
|
|
|
# Emitted LLVM IR, from `flan emit` or a kept build
|
|
*.ll
|
|
|
|
# The pre-rewrite menhir/ocamllex frontend: reference only, excluded from the
|
|
# build by the root dune file. Its contents are in git history at 2c232dd.
|
|
old-ocaml/
|
|
|
|
# Built executables from `flan build`
|
|
/calc-me
|
|
/sand
|
|
/conditions-play
|
|
.claude/
|
|
probe
|
|
probe.c
|
|
|
|
# raylib built for the browser: a 1.6MB archive and the pinned checkout it
|
|
# came from. vendor/raylib/build-web.sh makes both, and the path is named to a
|
|
# build through FLAN_RAYLIB_WEB, not committed.
|
|
vendor/raylib/web/
|