# Ann: SWI-Prolog 10.1.1 (devel)

**URL:** <https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471>\
**Category:** Releases\
**Created:** [January 5, 2026, 3:34pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471 "2026-01-05T15:34:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [January 5, 2026, 3:34pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/1 "2026-01-05T15:34:14Z")

</div>

Dear SWI-Prolog user,

SWI-Prolog 10.1.1 is ready for download. Highlights:

- Tighten code sanity, mostly by @mgondan1. See UBSAN topics below.  
Also other minor code cleanup.

- Fixed broken WASM build

- Enhancements and fixes to JSON RPC libraries.

- Several fixes and enhancements to XPCE. Fixed the thread monitor,  
avoid crashes on partial object initialization and further fixes and  
enhancements to the LSP support.

# SWI-Prolog Changelog since version 10.1.0

- ENHANCED: edit/1: if multiple hits are in the same file, take most  
specific. Thus, if both the file and some object inside the file  
match, use the object. Also xpce classes are more specific that the  
module they are contained in.

- FIXED: edit/1 for normal predicates. Broken after integrating  
foreign predicates.

- FIXED: UBSAN: Calling event handler with too many arguments.

- UBSAN: Avoid offset to NULL pointer

- UBSAN: Possible increment of NULL pointer This is benign, but  
officially undefined.

- FIXED: Type handling for PL\_thread\_at\_exit(). Resulted in reported  
undefined behaviour due to non-matching function prototype.

- CLEANUP: Unconditionally use fpclassify() This is available on any  
system providing C99 and we already demand C11.

- PORT: Make compile using Emscripten

## Package json

- FIXED: Server side handling for methods without parameters.  
Now accepts omitted `params` field as well as `"params": {}` as  
valid input for such a method.

- FIXED: Correctly call methods that take no parameters

- ADDED: json\_call/4: option async(:Goal) Extends async(true) to get  
an asynchronous reply.

- FIXED: json\_method/1: Avoid discontiguous messages

- ADDED: Print a warning if the server receives a non-implemented  
notification.

- ADDED: json\_rpc\_call/4, etc: option thread\_alias(+Atom)

- ADDED: JSON RPC server: set `json_rpc_stream` global variable while  
dispatching. This variable provides access to the underlying stream.  
This may be used to identify the connection.

## Package libedit

- FIXED: Build on Windows for enhanced background write handling.

- ENHANCED: Refreshing the terminal on background writes.

## Package utf8proc

- FIXED: #1 UBSAN: adding to NULL pointer.

## Package xpce

- ENHANCED: `editor->align`: minimize the change This reduces  
change/undo info and keeps the buffer marked clean if no change  
happens.

- FIXED: Collecting LSP change message could corrupt edit modifications.

- ADDED: Broadcast `pce_emacs(saved(Buffer))` when a buffer was saved.  
Can be used to trigger an LSP didSave() event, automatically recompile,  
etc.

- FIXED: Avoid undefined `@nil->update` in bookmark handling.

- ENHANCED: Only display output from help/1 in GUI when invoked from  
the gui.

- ADDED: `error->feedback` type `backtrace` to force errors to dump  
a backtrace.

- FIXED: Avoid memory corruption when -\>initialise fails. The partial  
object may have references. If so, leave its final destruction to  
the reference count dropping to zero.

- CLEANUP: Replace all calls to sprintf() with snprintf()

- FIXED: Thread monitor. Broken due to changes to class image.  
New code is simplified by using `image->fill` and `num` rather than  
`int|real` type.

- FIXED: `image->fill` to accept a colour. Filling with images is  
currently not supported.

---

<div class="post-metadata">

**Author:** ![joseph-vidal-rosset](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/joseph-vidal-rosset/32/2594_2.png) [@joseph-vidal-rosset](https://swi-prolog.discourse.group/u/joseph-vidal-rosset)\
**Post date:** [January 8, 2026, 8:02am UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/2 "2026-01-08T08:02:59Z")

</div>

Hi Jan . I am going to install this 10.1.1 , thanks . I wonder about the wasm update: what need I to do to update my wasm setup?  
I’ll keep you informed.  
Thanks for your help, and Happy New Year !  
Jo.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [January 8, 2026, 9:56am UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/3 "2026-01-08T09:56:55Z")

</div>

> [@joseph-vidal-rosset](#):
>
> I wonder about the wasm update: what need I to do to update my wasm setup?

Nothing special. 10.1.1 is not much different from 9.3.36. Devel series typically does not make big jumps except for occasional big rewrites. These happened in the 9.3 series, but they had few consequences for the Prolog user.

---

<div class="post-metadata">

**Author:** ![joseph-vidal-rosset](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/joseph-vidal-rosset/32/2594_2.png) [@joseph-vidal-rosset](https://swi-prolog.discourse.group/u/joseph-vidal-rosset)\
**Post date:** [January 8, 2026, 12:13pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/4 "2026-01-08T12:13:12Z")

</div>

Many thanks Jan. So, it would be maybe wiser to wait that I take time to update my MX Linux to update all my SWI-Prolog setup, don’t you think so?

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [January 8, 2026, 12:48pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/5 "2026-01-08T12:48:44Z")

</div>

It all depends on what you care about, what you depend upon, which version you are upgrading from and which platform.

---

<div class="post-metadata">

**Author:** ![joseph-vidal-rosset](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/joseph-vidal-rosset/32/2594_2.png) [@joseph-vidal-rosset](https://swi-prolog.discourse.group/u/joseph-vidal-rosset)\
**Post date:** [January 8, 2026, 1:00pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/6 "2026-01-08T13:00:35Z")

</div>

```prolog
joseph@mx:~$ swipl --version
SWI-Prolog version 9.3.34 for x86_64-linux

```

It is the previous devel. version, and I plan to upgrade MX Linux 23 to 25, which needs backup, etc.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [January 8, 2026, 1:19pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/7 "2026-01-08T13:19:38Z")

</div>

In that case I’d first update Linux. It will also give you a faster Prolog as more recent gcc versions typically produce faster code.

---

<div class="post-metadata">

**Author:** ![mgondan1](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/mgondan1/32/803_2.png) [@mgondan1](https://swi-prolog.discourse.group/u/mgondan1)\
**Post date:** [January 8, 2026, 9:13pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/8 "2026-01-08T21:13:00Z")

</div>

Thanks Jan! By the way, CRAN is complaining again, so expect additional PRs to make a few more grumpy sanitizers happy. Oh my…

---

<div class="post-metadata">

**Author:** ![joseph-vidal-rosset](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/joseph-vidal-rosset/32/2594_2.png) [@joseph-vidal-rosset](https://swi-prolog.discourse.group/u/joseph-vidal-rosset)\
**Post date:** [January 15, 2026, 6:54pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/9 "2026-01-15T18:54:35Z")

</div>

Hi Jan,

On MX Linux 25, fresh install of SWI-Prolog :

```prolog
-- Build files have been written to: /usr/local/swipl-devel/build
root@mx:/usr/local/swipl-devel/build# ninja
ninja: error: 'man/ssl', needed by 'man/lib/prologpack.tex', missing and no known rule to make it
root@mx:/usr/local/swipl-devel/build# 

I do not know what I can do... 
Thanks for your help. 
Jo.
```

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [January 15, 2026, 8:16pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/10 "2026-01-15T20:16:20Z")

</div>

> [@joseph-vidal-rosset](#):
>
> `I do not know what I can do... `

Seems you did not install the OpenSSL (or LibreSSL) dependency. Good advice is to run in the build directory

```
 cmake .

```

That should tell you about missing dependencies that have consequences.

---

<div class="post-metadata">

**Author:** ![joseph-vidal-rosset](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/joseph-vidal-rosset/32/2594_2.png) [@joseph-vidal-rosset](https://swi-prolog.discourse.group/u/joseph-vidal-rosset)\
**Post date:** [January 16, 2026, 8:37am UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/11 "2026-01-16T08:37:13Z")

</div>

Hi Jan,

I have finally succeeded to install the latest version of SWI-Prolog . But I do not succeed to install WASM in my laptop with Linux MX 25. I meet errors and errors and it is really complicated, more complicated than with the previous version.

```prolog
configure: cmake -DCMAKE_INSTALL_PREFIX=/root/wasm -DPCRE2GREP_SUPPORT_JIT=OFF -G Ninja .. -DCMAKE_TOOLCHAIN_FILE=/usr/share/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/usr/bin/node
CMake Deprecation Warning at CMakeLists.txt:106 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

-- Could NOT find BZip2 (missing: BZIP2_LIBRARIES BZIP2_INCLUDE_DIR) 
CMake Warning at CMakeLists.txt:129 (FIND_PACKAGE):
  By not providing "FindReadline.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Readline",
  but CMake did not find one.

  Could not find a package configuration file provided by "Readline" with any
  of the following names:

    ReadlineConfig.cmake
    readline-config.cmake

  Add the installation prefix of "Readline" to CMAKE_PREFIX_PATH or set
  "Readline_DIR" to a directory containing one of the above files. If
  "Readline" provides a separate development package or SDK, be sure it has
  been installed.

CMake Warning at CMakeLists.txt:130 (FIND_PACKAGE):
  By not providing "FindEditline.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Editline",
  but CMake did not find one.

  Could not find a package configuration file provided by "Editline" with any
  of the following names:

    EditlineConfig.cmake
    editline-config.cmake

  Add the installation prefix of "Editline" to CMAKE_PREFIX_PATH or set
  "Editline_DIR" to a directory containing one of the above files. If
  "Editline" provides a separate development package or SDK, be sure it has
  been installed.

CMake Error at CMakeLists.txt:498 (file):
  file STRINGS file "/usr/local/configure.ac" cannot be read.

CMake Error at CMakeLists.txt:518 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  CMakeLists.txt:530 (PARSE_LIB_VERSION)

CMake Error at CMakeLists.txt:518 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  CMakeLists.txt:531 (PARSE_LIB_VERSION)

CMake Error at CMakeLists.txt:518 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  CMakeLists.txt:532 (PARSE_LIB_VERSION)

CMake Error at CMakeLists.txt:518 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  CMakeLists.txt:533 (PARSE_LIB_VERSION)

CMake Error: File /usr/local/src/pcre2.h.in does not exist.
CMake Error at CMakeLists.txt:535 (CONFIGURE_FILE):
  CONFIGURE_FILE Problem configuring file

CMake Error: File /usr/local/libpcre2-posix.pc.in does not exist.
CMake Error at CMakeLists.txt:556 (CONFIGURE_FILE):
  CONFIGURE_FILE Problem configuring file

CMake Error: File /usr/local/libpcre2-8.pc.in does not exist.
CMake Error at CMakeLists.txt:560 (CONFIGURE_FILE):
  CONFIGURE_FILE Problem configuring file

CMake Error: File /usr/local/pcre2-config.in does not exist.
CMake Error at CMakeLists.txt:583 (CONFIGURE_FILE):
  CONFIGURE_FILE Problem configuring file

CMake Error: File /usr/local/src/pcre2_chartables.c.dist does not exist.
CMake Error at CMakeLists.txt:598 (CONFIGURE_FILE):
  CONFIGURE_FILE Problem configuring file

CMake Error: File /usr/local/cmake/pcre2-config.cmake.in does not exist.
CMake Error at CMakeLists.txt:1092 (configure_file):
  configure_file Problem configuring file

CMake Error: File /usr/local/cmake/pcre2-config-version.cmake.in does not exist.
CMake Error at CMakeLists.txt:1095 (configure_file):
  configure_file Problem configuring file

-- 
-- 
-- PCRE2-. configuration summary:
-- 
-- Install prefix .................. : /root/wasm
-- C compiler ...................... : /usr/local/wasm/emsdk/upstream/emscripten/emcc
-- C compiler flags ................ : -O3 -DNDEBUG
-- 
-- Build 8 bit PCRE2 library ....... : ON
-- Build 16 bit PCRE2 library ...... : OFF
-- Build 32 bit PCRE2 library ...... : OFF
-- Enable JIT compiling support .... : OFF
-- Use SELinux allocator in JIT .... : IGNORE
-- Enable Unicode support .......... : ON
-- Newline char/sequence ........... : LF
-- \R matches only ANYCRLF ......... : OFF
-- \C is disabled .................. : OFF
-- EBCDIC coding ................... : OFF
-- EBCDIC coding with NL=0x25 ...... : OFF
-- Rebuild char tables ............. : OFF
-- Internal link size .............. : 2
-- Parentheses nest limit .......... : 250
-- Heap limit ...................... : 20000000
-- Match limit ..................... : 10000000
-- Match depth limit ............... : MATCH_LIMIT
-- Build shared libs ............... : OFF
-- Build static libs ............... : ON
-- with PIC enabled ............. : OFF
-- Build pcre2grep ................. : ON
-- Enable JIT in pcre2grep ......... : OFF
-- Enable callouts in pcre2grep .... : ON
-- Enable callout fork in pcre2grep. : ON
-- Buffer size for pcre2grep ....... : 20480
-- Build tests (implies pcre2test .. : ON
-- and pcre2grep)
-- Link pcre2grep with libz ........ : ON
-- Link pcre2grep with libbz2 ...... : Library not found
-- Link pcre2test with libeditline . : Library not found
-- Link pcre2test with libreadline . : Library not found
-- Support Valgrind .................: OFF
-- Use %zu and %td ..................: AUTO
-- 
-- Configuring incomplete, errors occurred!
emcmake: error: 'cmake -DCMAKE_INSTALL_PREFIX=/root/wasm -DPCRE2GREP_SUPPORT_JIT=OFF -G Ninja .. -DCMAKE_TOOLCHAIN_FILE=/usr/share/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/usr/bin/node' failed (returned 1)

```

I do not understand these errors with pcre2 that is said to be “optional”…

All the best,  
Jo.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [January 16, 2026, 9:28am UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/12 "2026-01-16T09:28:51Z")

</div>

> [@joseph-vidal-rosset](#):
>
> I do not understand these errors with pcre2 that is said to be “optional”…

pcre2 is optional for building SWI-Prolog, but this seems an error building the dependency. If you don’t need regular expressions in Prolog, just ignore it and SWI-Prolog for WASM should still build. You may have to disable the `pcre` package, but probably it will drop it itself if libpcre cannot be found.

---

<div class="post-metadata">

**Author:** ![joseph-vidal-rosset](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/joseph-vidal-rosset/32/2594_2.png) [@joseph-vidal-rosset](https://swi-prolog.discourse.group/u/joseph-vidal-rosset)\
**Post date:** [January 16, 2026, 9:42am UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/13 "2026-01-16T09:42:42Z")

</div>

Thanks for your help Jan. I will insist to install wasm in my laptop with Linux MX 25. I’ll keep you informed.  
All the best,  
Jo.

---

<div class="post-metadata">

**Author:** ![joseph-vidal-rosset](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/joseph-vidal-rosset/32/2594_2.png) [@joseph-vidal-rosset](https://swi-prolog.discourse.group/u/joseph-vidal-rosset)\
**Post date:** [January 16, 2026, 4:24pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/14 "2026-01-16T16:24:17Z")

</div>

````prolog
Setting up EMSDK environment (suppress these messages with EMSDK_QUIET=1)
Adding directories to PATH:
PATH += /usr/local/wasm/emsdk
PATH += /usr/local/wasm/emsdk/upstream/emscripten

Setting environment variables:
PATH = /usr/local/wasm/emsdk:/usr/local/wasm/emsdk/upstream/emscripten:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin
EMSDK = /usr/local/wasm/emsdk
EMSDK_NODE = /usr/local/wasm/emsdk/node/22.16.0_64bit/bin/node
-- Configuring SWI-Prolog-10.1.1
-- Added packages sgml: Required by package clib
-- Added packages json: Required by package http
-- Added packages RDF nlp zlib: Required by package semweb
Please use -DGMP_ROOT=dir to enable GMP on Emscripen
Please use -DGMP_ROOT=dir to enable GMP on Emscripen
-- Could NOT find LibUUID (missing: LIBUUID_INCLUDE_DIR UUID_LIBRARY) 
-- Could NOT find PCRE (missing: PCRE_LIBRARY PCRE_INCLUDE_DIR) 
-- Configuring done (0.9s)
-- Generating done (0.1s)
-- Build files have been written to: /usr/local/wasm/swipl-devel/build.wasm
root@mx:/usr/local/wasm/swipl-devel/build.wasm# ninja
ninja: error: '/lib/libgmp.a', needed by 'src/swipl.js', missing and no known rule to make it
root@mx:/usr/local/wasm/swipl-devel/build.wasm# ```

That's really hard...
````

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [January 16, 2026, 4:49pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/15 "2026-01-16T16:49:22Z")

</div>

> [@joseph-vidal-rosset](#):
>
> `That's really hard...`

Well … 🙂

> [@joseph-vidal-rosset](#):
>
> `Please use -DGMP_ROOT=dir to enable GMP on Emscripen`

You either need to build and install GMP for Emscripten or pass `-DUSE_GMP=OFF` to cmake. That is the default as the libBF support for big nums is much smaller and avoids LGPL license issues (but GMP is faster, notably for rational numbers).

The normal procedure:

- Choose a directory for your WASM dependencies and tools. Default is `$HOME/wasm`. If you using anything else, set the environment variable `WASM_HOME`.
- Make sure emsdk is installed in that dir
- Build the dependencies in subdirectories of this dir and make sure they install in {bin,lib,include} below thuis dir.
- Go to the Prolog source tree
- run `mkdir build.wasm`
- cd into `build.wasm` and run `../scripts/configure`. Check the messages.
- If ok, run `ninja`.

See `scripts/configure` for details.

---

<div class="post-metadata">

**Author:** ![joseph-vidal-rosset](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/joseph-vidal-rosset/32/2594_2.png) [@joseph-vidal-rosset](https://swi-prolog.discourse.group/u/joseph-vidal-rosset)\
**Post date:** [January 16, 2026, 5:55pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/16 "2026-01-16T17:55:24Z")

</div>

Many many thanks Jan, that is very helpful.

(By the way, this [WASM Tinker](https://g4-mic.vidal-rosset.net/wasm/tinker) has been improved, the job is almost done now).

Have a nice week-end and thank you again !

---

<div class="post-metadata">

**Author:** ![joseph-vidal-rosset](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/joseph-vidal-rosset/32/2594_2.png) [@joseph-vidal-rosset](https://swi-prolog.discourse.group/u/joseph-vidal-rosset)\
**Post date:** [January 17, 2026, 8:13pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/17 "2026-01-17T20:13:16Z")

</div>

Dear Jan,

I successfully built SWI-Prolog for WebAssembly on Debian-based Linux (MX 25), but encountered two critical issues that need upstream attention:

## 1. CRITICAL: LibBF Build Failure on Emscripten

**File:** `src/libbf/cutils.h`  
**Issue:** Uses GCC-specific ` __attribute__ ((assume(expr)))` not supported by Emscripten

**Error:** Compilation fails without manual patching

**Required fix:**

c

```prolog
// Line 32 and similar occurrences
#ifdef EMSCRIPTEN
#define ASSUME(expr) do {} while(0)
#else
#define ASSUME(expr) __attribute__ ((assume(expr)))
#endif

```

Without this patch, WASM compilation is **impossible**. This should be fixed upstream immediately, as it affects all users attempting WASM builds.

## 2. Missing SWI-Tinker

The interactive tinker shell was removed from the main repository on March 1, 2025 (commit 3db1890).

**Issue:** The old tinker code no longer works - `wasm_query_loop/0` doesn’t exist in current WASM builds.

**Questions:**

- Where is the new tinker? Separate npm package?
- What’s the new API for interactive WASM shells?
- Is there a migration path for existing users?

The tinker was essential for pedagogical use of WASM SWI-Prolog. Its disappearance without documentation creates a significant gap.

## Test Results

After patching cutils.h:

- ✅ All 51 tests passed (100%)
- ✅ `node src/swipl.js` works perfectly
- ❌ Tinker unusable (API incompatibility)

Best regards,  
Jo (with great help of claude.ai)

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [January 18, 2026, 9:25am UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/18 "2026-01-18T09:25:58Z")

</div>

> [@joseph-vidal-rosset](#):
>
> **Issue:** Uses GCC-specific ` __attribute__ ((assume(expr)))` not supported by Emscripten

Works fine here as well as in the NPM package build. Using EMSDK 4.0.22 at the moment.

> [@joseph-vidal-rosset](#):
>
> Where is the new tinker?

> **[GitHub - SWI-Prolog/tinker: SWI-Tinker: a browser playground for SWI-Prolog](https://github.com/SWI-Prolog/tinker)**
>
> SWI-Tinker: a browser playground for SWI-Prolog

For migration you’ll have to compare the code. I think the changes are marginal. The old version was merely a PoC. Since, the WASM interface has been extended to support asynchronous Prolog goals and yield-based debugging. These allow for building proper interactive web applications, including a Prolog debugger. With this, Tinker got a bit too large to be just a demo for the WASM version, so it was turned into a distinct project.

---

<div class="post-metadata">

**Author:** ![joseph-vidal-rosset](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/joseph-vidal-rosset/32/2594_2.png) [@joseph-vidal-rosset](https://swi-prolog.discourse.group/u/joseph-vidal-rosset)\
**Post date:** [January 18, 2026, 9:46am UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/19 "2026-01-18T09:46:24Z")

</div>

Many thanks Jan, your reply is very helpful. As usual. I did not think to search on Github; I apologize. It seems to me that SWI-Prolog version 10.1.1 for x86\_64-linux that I installed yesterday is quicker than 9.3, but it would not be really surprising. I will install the New SWI-Tinker soon. Thanks again, and have a nice Sunday.  
All the best,  
Jo.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [January 21, 2026, 10:39am UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471/20 "2026-01-21T10:39:07Z")

</div>

> [@jan](#):
>
> Works fine here as well as in the NPM package build. Using EMSDK 4.0.22 at the moment.

This appears wrong. SWI-Prolog compiles fine with EMSDK 4.0.15. A clean build using EMSDK 4.0.22 crashes while building the .qlf files. I do not know the exact version of EMSDK that introduced this, neither whether it is an Emscripten or Prolog bug.

If anyone wishes to figure that out, please do and report!

[Next page](https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-1-devel/9471.md?page=2)
