[quickjs-devel] Re: Should I?

  • From: "Eduard Suica" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "rokempes" for DMARC)
  • To: <quickjs-devel@xxxxxxxxxxxxx>
  • Date: Wed, 12 Feb 2020 15:31:17 +0000 (UTC)

 You may want to check out https://github.com/eduardsui/jib.js
It is somehow node.js compatible.
It supports windows and uses a “stolen” poll implementation for windows that 
supports sockets, pipes, files and console. It has no dependencies and it 
supports both quickjs and ducktape.
    On Wednesday, February 12, 2020, 02:34:26 AM GMT+2, fred 
<fred_weigel@xxxxxxxxxxx> wrote:  
 
 I am evaluating QuickJS for a remote application. Specifically, the
first deployment is in a Motorolla radio console. I did a simple ffi to
allow a Javascript program to call to the radio console API. I then did
a "quick and dirty" websocket server.

However, the radio console uses Windows. In order to get event driven
programming, I am working on modifying the js_os_poll function. Note
that os_poll_func is available, but is not accessible. If that were
accessible, the changes could be isolated without change quickjs-libc.c

To get the websocket server to work, I need to implement event driven
read from anonymous pipe. On Linux, this works because the fd can be
passed to select(). On Windows, I am thinking of creating a thread that
does a blocking read() on the pipe for one byte. Wait for single or
multiple object will wait for thread completion. This can be used in
js_os_poll. The byte read from the pipe can be saved, and supplied for
the javascript read. The same mechanism can be used for events on other
(non-socket) file descriptors.

As well, I will be adding the ability to load Windows dll external
modules.

Lastly, I am building a simple external interface to the sqlite3
library.

The sqlite3 interface will be published on my github. The QuickJS
changes can be either published here as patches, or I can create a
github project. How much interest is there in this? Do people want the
patches here? Or on github?

Are the changes to quickjs-libc of more interest (merged upstream)?

FredW



  

Other related posts: