-
Notifications
You must be signed in to change notification settings - Fork 158
Open
Description
Description
I'm having difficulty getting this library to work with wasm compilation.. It throws an exception when creating the Machine object.
For what it's worth, I first encountered this error when using MachineBuilder in rust code that I was compiling to wasm, but this example is simpler.
Apologies if I missed an issue/bug template, I couldn't find one! Happy to edit for provide more information as necessary. I'm a big fan of this project, and have been excited about giving wasm prolog a spin for a while.
Reproduction
Compiled on an M1 MacBook Pro, running MacOS 26.1
- Clone the repository
- Run
wasm-pack build --target web -- --no-default-features - Create an
index.htmlwith the example sudoku solver - Open it with a web server
In Firefox:
Uncaught RuntimeError: index out of bounds
build http://localhost:3000/pkg/scryer_prolog.js:272
<anonymous> http://localhost:3000/:16
In Chrome:
Uncaught RuntimeError: memory access out of bounds
at 011abea2:0x303b9e
at 011abea2:0x2e1128
at 011abea2:0x85bd
at 011abea2:0x2b8ea7
at MachineBuilder.build (scryer_prolog.js:272:26)
at (index):16:46
guregu and infogulch
Metadata
Metadata
Assignees
Labels
No labels