slint icon indicating copy to clipboard operation
slint copied to clipboard

update the JS node bindings

Open ogoffart opened this issue 2 years ago • 1 comments

Right now the node bindings are using an outdated version of neon (0.8) but these don't work with the newer node ( it is sticked at node 16) One problem is that the type that we can wrap needs to be Send, which is not the case for the type used by the slint-interpreter because we use Rc all over the place.

Since the API changed a lot, we should consider if we should switch from neon to something like https://napi.rs/

Hopefully both crates now allow to hold "persistent" handle so we can get rid of our Persistent context hack.

ogoffart avatar Feb 16 '22 21:02 ogoffart

Newer Windows images in GitHub also come with a newer version of Visual Studio (2022), which in turn breaks the neon build, because via its package-lock.json it pins a version of neon-gyp that doesn't know that VS 2022 exists (yet). For now I'll disable the node bindings build on Windows in #1446, but this is yet another argument in favor of upgrading.

tronical avatar Aug 02 '22 06:08 tronical

not work, when executing npm install slint-ui

error are:

npm ERR! code 1 npm ERR! path /Users/alex/workspace/rust.com/share-rust-all/slint-ui-demo/node_modules/slint-ui npm ERR! command failed npm ERR! command sh -c neon build --release && tsc npm ERR! neon info forcing rebuild for new build settings npm ERR! neon info running cargo npm ERR! Updating sjtu index

env info: node -v v16.0.0 cargo -V cargo 1.69.0 (6e9a83356 2023-04-12) macOS rustc -V rustc 1.69.0 (84c898d65 2023-04-16)

jackiealex avatar Jun 01 '23 13:06 jackiealex

Closing this as we released 1.3.0 with it.

tronical avatar Nov 28 '23 09:11 tronical