You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I checked for possible duplicate issues, with possible answers.
Bug summary
Hey,
I'm one of the developers working on PGlite, a WASM build of Postgres. Polygen looks super cool! I'm very excited to try PGlite with it. We have been looking at various routes to React Native support, and Polygen look like it could be a perfect fit. We have done some experiments with wasm2c and have validated that we can run a PGlite build thats been decompiled to C with it.
However, when I run npx polygen generate I am seeing this error:
npx polygen generate
ℹ Generating code for 1 WebAssembly module(s) 16:51:55
✖ Processing local module ./assets/postgres.wasm
[16:51:55] ERROR Error generating modules: Could not read 'valtype', unexpected byte: b, expected one of [127, 126, 125, 124, 123, 112, 111] (binary offset: 0x40f4)
We tried it with both an Emscripten build, and one produces by the WASI SDK and get a similar result.
The WASI build of PGlite (which we event officially released yet) does decompile with wasm2c - we've tried that route ourselves.
Download the files above, put them in a project with polygon, and try to run generate against them.
Reproducible sample code
exportdefaultpolygenConfig({/......snip/** * List of modules to be used in the project. * * Each module can be individually configured, by passing options object as a second * argument (or 3rd, for external modules). */modules: [localModule('./assets/postgres.wasm'),// localModule('./assets/pglite.wasi'),],});
The text was updated successfully, but these errors were encountered:
Before submitting a new issue
Bug summary
Hey,
I'm one of the developers working on PGlite, a WASM build of Postgres. Polygen looks super cool! I'm very excited to try PGlite with it. We have been looking at various routes to React Native support, and Polygen look like it could be a perfect fit. We have done some experiments with wasm2c and have validated that we can run a PGlite build thats been decompiled to C with it.
However, when I run
npx polygen generate
I am seeing this error:We tried it with both an Emscripten build, and one produces by the WASI SDK and get a similar result.
The WASI build of PGlite (which we event officially released yet) does decompile with wasm2c - we've tried that route ourselves.
These are the two files:
Emscripten build: postgres.wasm.zip
WASI SDK build: pglite.wasi.zip
Please let me know if there is anything I can do to help debug this.
Library version
0.2.1
Environment info
Steps to reproduce
Download the files above, put them in a project with polygon, and try to run generate against them.
Reproducible sample code
The text was updated successfully, but these errors were encountered: