Open
Description
These bindings are excellent and could be big for CL.
As we discussed though, I currently have errors when trying the examples :S
I'll add details, if anyone has an idea, thanks in advance.
I run this:
(in-package :webui)
(defun minimal ()
(let ((w (webui-new-window)))
(webui-bind w "my-button"
(lambda (event)
(declare (ignore event))
(webui-run w "alert(\"hi\");")))
(webui-show w "<html>
<script src=\"webui.js\"></script>
Hello,
<button id=\"my-button\">world!</button>
</html>")
(webui-wait)))
(minimal)
Versions
System version
it's old-ish
OS: Linux Mint 20 LTS x86_64 (Ubuntu Focal)
Kernel: 5.4.0-176-generic
gcc 9.4
GLIBC 2.31
Lisp versions
CFFI pulled today
SBCL 2.1.5, 2.4.1 and 2.4.5
CL-USER> (webui::minimal)
Unhandled memory fault at #x7F49D4E04A60.
[Condition of type SB-SYS:MEMORY-FAULT-ERROR]
Restarts:
0: [RETRY] Retry SLIME REPL evaluation request.
1: [*ABORT] Return to SLIME's top level.
2: [ABORT] abort thread (#<THREAD tid=843809 "repl-thread" RUNNING {100586DD33}>)
Backtrace:
0: (SB-SYS:MEMORY-FAULT-ERROR #<unused argument> #.(SB-SYS:INT-SAP #X7F49D4E04A60))
1: ("foreign function: call_into_lisp_")
2: ("foreign function: funcall2")
3: ("foreign function: handle_memory_fault_emulation_trap")
4: ("foreign function: handle_trap")
5: ("foreign function: #x55FAD404D7B5")
6: (WEBUI::MINIMAL)
CCL "Version 1.11-r16635 (LinuxX8664)"
CL-USER> (webui::minimal )
The value (:INTERNAL CFFI-CALLBACKS::|WEBUI::WEBUI-BIND-CB|
WEBUI:WEBUI-BIND) is not of the expected type (AND
SYMBOL
(NOT
(SATISFIES
CONSTANTP))).
[Condition of type TYPE-ERROR]
Restarts:
0: [RETRY] Retry SLIME REPL evaluation request.
1: [*ABORT] Return to SLIME's top level.
2: [ABORT-BREAK] Reset this thread
3: [ABORT] Kill this thread
Backtrace:
0: (CCL::DEFINE-CALLBACK-FUNCTION #<COMPILED-LEXICAL-CLOSURE (:INTERNAL CFFI-CALLBACKS::|WEBUI::WEBUI-BIND-CB| WEBUI:WEBUI-BIND) #x302002D15A7F> NIL NIL NIL)
Locals:
LISP-FUNCTION = #<COMPILED-LEXICAL-CLOSURE (:INTERNAL CFFI-CALLBACKS::|WEBUI::WEBUI-BIND-CB| WEBUI:WEBUI-BIND) #x302002DD947F>
DOC-STRING = NIL
WITHOUT-INTERRUPTS = NIL
INFO = NIL
NAME = (:INTERNAL CFFI-CALLBACKS::|WEBUI::WEBUI-BIND-CB| WEBUI:WEBUI-BIND)
TRAMPOLINE = NIL
1: (WEBUI:WEBUI-BIND 2 "my-button" #<COMPILED-LEXICAL-CLOSURE (:INTERNAL WEBUI::MINIMAL) #x302002D15ABF>)
2: (WEBUI::MINIMAL)
webui C bindings
I built them with make
, the minimal C example works (with a Makefile tweak, see their issues).
Metadata
Metadata
Assignees
Labels
No labels