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
Thanks for merging my WASM PRs. I'm making this issue to help me keep track of what hasn't been upstreamed yet.
All of this stuff is available at: https://github.com/guregu/trealla
Need to split this into 2 modules: JSON toplevel (js_ask/1) and Javsascript-specific helpers like js_fetch/3 (trealla-prolog/go needs the toplevel but not the JS helpers)
Host call stuff: '$host_call'/2 and '$host_resume'/1. These are two native predicates for passing data between guest → host → guest, used for calling JS from Prolog.
Includes Makefile changes to build the pure WASI version and the 'libtpl.wasm' version with host call predicates.
If we use better WASI libraries for trealla-js, we might not need these at all, and we can use pipes/sockets/whatever instead.
Toplevel formatting hacks for WASM/pl_query.
In pl_query mode, don't print spaces before var dumps.
In pl_query mode, always include the dot for terms and don't print "; " on redo, etc. This gives us uniform results in the WASM library query iterators.
Implemented in fork, need to port over. Generalization of with_output_to etc. Used to capture stdout/stderr for wasm client.
string/1?
Need predicate for "string but not atom", probably already exists?
Wow, that was a lot of stuff. Anyway, instead of dumping one huge PR on you I will make small ones that add things as they are stabilized.
Of course, I'd be happy to change how things work so feel free to reject anything. My aim is to be minimally invasive :-)
The text was updated successfully, but these errors were encountered:
Still have lots to do, updated it. I can break it into smaller issues instead of leaving this one open forever if that's preferable (I don't mind either way).
Thanks for merging my WASM PRs. I'm making this issue to help me keep track of what hasn't been upstreamed yet.
All of this stuff is available at: https://github.com/guregu/trealla
library(js)
JSON-based programmatic toplevel & javascript native predicatesjs_ask/1
) and Javsascript-specific helpers likejs_fetch/3
(trealla-prolog/go needs the toplevel but not the JS helpers)JSON related hacks: Fast JSON library guregu/trealla#5'$host_call'/2
and'$host_resume'/1
. These are two native predicates for passing data between guest → host → guest, used for calling JS from Prolog.pl_query
.pl_query
mode, don't print spaces before var dumps.pl_query
mode, always include the dot for terms and don't print "; " on redo, etc. This gives us uniform results in the WASM library query iterators.trealla.h
and add aquery_did_yield
API intrealla.h
string/1
?Wow, that was a lot of stuff. Anyway, instead of dumping one huge PR on you I will make small ones that add things as they are stabilized.
Of course, I'd be happy to change how things work so feel free to reject anything. My aim is to be minimally invasive :-)
The text was updated successfully, but these errors were encountered: