Build every family and take the wasm surface from the catalog - #19
Merged
Conversation
The generator emits a wrapper for every function the catalog marks public and builds the `#include` preamble from the headers those functions come from, so the emitted set and the declared set are one set. A header named in one list and absent from the other is what leaves a wrapper calling a function no header declares, which is how `interval_eq` and its siblings arrive undeclared. The image builds MobilityDB with `-DALL=ON` and carries the wasm stages the families that turns on need: zlib 1.3.1 and libxml2 2.13.5 for pgPointCloud's libpc, and GDAL 3.9.3 for raster band sampling. GDAL takes every optional driver off, since MEOS reads bands through the generic API, and the dependencies it keeps, PROJ and SQLite, are ones this image already builds. The emcc line asks `pkg-config` for the MEOS flags rather than naming an include path. The installed `meos.pc` reports the include directory together with the family macros the library carries, and the public headers gate declarations on those macros, so a path given without them compiles the negative branch and loses declarations whose symbols the archive exports. The configure step names the install prefix for the same reason: `meos.pc` records the prefix given at configure time, so a prefix supplied only to the install step leaves the file naming the emscripten sysroot. `EMULATE_FUNCTION_POINTER_CASTS` gives every indirect call one signature, as wide as the widest function type linked in, and GDAL carries the widest, so the `fpcast-emu` pass takes the parameter cap it names in its own diagnostic. The surface is 3470 wrappers, 0 skipped and 0 duplicates, against 2839 exports. `pkg-config` inside the image reports all ten families through `-DS2CELL=1`, and the built `meos.wasm` carries `tpcbox_make`, `meos_initialize_pointcloud`, `posechain_in`, `s2cell_in`, `raster_value` and `timetz_in`. `TNumber.avgValue()` goes with it. The catalog marks `tnumber_avg_value` internal, so the projection does not emit it, and the typed layers of the two mature bindings agree: PyMEOS's `TNumber` and JMEOS's `TNumber` each expose `integral` and the time-weighted average and neither exposes the plain one. `timeWeightedAverage()` stays, on the public `tnumber_twavg`.
estebanzimanyi
force-pushed
the
feat/derive-wasm-surface
branch
from
September 2, 2026 08:21
ac3d0a2 to
3cdcedc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The generator emits a wrapper for every function the catalog marks public and
builds the
#includepreamble from the headers those functions come from, so theemitted set and the declared set are one set. A header named in one list and
absent from the other is what leaves a wrapper calling a function no header
declares, which is how
interval_eqand its siblings arrive undeclared.The image builds MobilityDB with
-DALL=ONand carries the wasm stages thefamilies that turns on need: zlib 1.3.1 and libxml2 2.13.5 for pgPointCloud's
libpc, and GDAL 3.9.3 for raster band sampling. GDAL takes every optional driver
off, since MEOS reads bands through the generic API, and the dependencies it
keeps, PROJ and SQLite, are ones this image already builds.
The emcc line asks
pkg-configfor the MEOS flags rather than naming an includepath. The installed
meos.pcreports the include directory together with thefamily macros the library carries, and the public headers gate declarations on
those macros, so a path given without them compiles the negative branch and loses
declarations whose symbols the archive exports. The configure step names the
install prefix for the same reason:
meos.pcrecords the prefix given atconfigure time, so a prefix supplied only to the install step leaves the file
naming the emscripten sysroot.
EMULATE_FUNCTION_POINTER_CASTSgives every indirect call one signature, as wideas the widest function type linked in, and GDAL carries the widest, so the
fpcast-emupass takes the parameter cap it names in its own diagnostic.The surface is 3470 wrappers, 0 skipped and 0 duplicates, against 2839 exports.
pkg-configinside the image reports all ten families through-DS2CELL=1, andthe built
meos.wasmcarriestpcbox_make,meos_initialize_pointcloud,posechain_in,s2cell_in,raster_valueandtimetz_in.