Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the JS node bindings #961

Closed
ogoffart opened this issue Feb 16, 2022 · 3 comments
Closed

update the JS node bindings #961

ogoffart opened this issue Feb 16, 2022 · 3 comments
Assignees
Labels
a:language-javascript JavaScript bindings (mF,bS) roadmap Tickets that we can use for roadmapping
Milestone

Comments

@ogoffart
Copy link
Member

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 ogoffart added the a:language-javascript JavaScript bindings (mF,bS) label Feb 16, 2022
@tronical
Copy link
Member

tronical commented Aug 2, 2022

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.

@jackiealex
Copy link

jackiealex commented Jun 1, 2023

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)

@tronical
Copy link
Member

Closing this as we released 1.3.0 with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:language-javascript JavaScript bindings (mF,bS) roadmap Tickets that we can use for roadmapping
Projects
None yet
Development

No branches or pull requests

4 participants