slint
slint copied to clipboard
update the JS node bindings
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.
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.
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)
Closing this as we released 1.3.0 with it.