slint-ui / slint-nodejs-template

A template for a Nodje.js Application using Slint. This is meant to be used with npm.
26 stars 6 forks source link

Feature request #4

Open commandline-be opened 5 months ago

commandline-be commented 5 months ago

Can it be considered to test this template against Deno to assure it is 100% compatible ?

https://deno.com/

Deno is the open-source JavaScript runtime for the modern web. Built on web standards with zero-config TypeScript, unmatched security, and a complete built-in toolchain, Deno is the easiest, most productive way to JavaScript.

Heziode commented 3 months ago

On my side, it works.

From the README, just update instructions to:

Usage

  1. Clone or download this repository
    git clone https://github.com/slint-ui/slint-nodejs-template my-project
    cd my-project
  2. Run the application binary
    deno run --allow-read --allow-ffi src/main.js

From the doc:

Slint-node (Beta)

Slint is a UI toolkit that supports different programming languages. Slint-node is the integration with Node.js and Deno.

To get started you use the walk-through tutorial. We also have a Getting Started Template repository with the code of a minimal application using Slint that can be used as a starting point to your program.

Warning: Beta Slint-node is still in the early stages of development: APIs will change and important features are still being developed. source

So, I suppose Deno is the exactly same API than Node.js. But, since it is in an early stage, the API can change.

tronical commented 3 months ago

Yeah, feel free to make a PR for the README.

One general issue with Deno is the inability to efficiently integrate event loops. The two loops will always be spinning and the app will constantly use the CPU.

With Node.js’ use and exposure of libuv, it’s (theoretically) possible to put both to sleep and wake up accordingly when there’s activity.