
Write fast, safe native Node plugins with Rust!
Joined December 2015
- Tweets105
- Following0
- Followers713
- Likes46
What's the simplest way to publish a Rust crate as an NPM package in 2023?
I'm trying to convert OpenAI's tiktoken BPE tokenizer to JS.
Considering @rustneon or napi-rs by @Brooooook_lyn, but I'm not too familiar w/ Rust and keep getting stuck.
4
3
2,786
Feel free to join the Neon community Slack! The #general channel is a great place to ask for help.
2
150
Then you’ll also need to supply an argument in the parentheses as well, which is a reference to a context. There’s usually a variable in scope called `cx` in idiomatic Neon code, which would get you what you want there.
1
14
As for iterating arrays, the easiest way is to convert to a Rust Vec and then iterate over that: neon-bindings.com/docs/array…
15
Neon retweeted
In my latest post I'm writing about procedures to improve @nodejs Lambda performance with the usage of @rustlang and @RustNeon .
You can find the blog post in DEV: dev.to/aws-builders/electrif…
Hope you will enjoy it😉
#AWSCommunityBuilders @awsdevelopers
For the latest side project that I'm unlikely to complete, I've decided to try write a parser for #PostgreSQL's specific flavor of SQL
Database-driven development has been a powerful tool for us @logixboard. It lets us iterate crazy fast and lean on the power of Postgres. But...
1
6
[2022-04-16] Neon Saves the Day:
After more poking around with binding Rust to Node, I found @RustNeon. Kudos to the builders there because it made everything trivial. I've now got a proof of concept for my parser exposed in Node.js 🙌
2
1
@dtromesh the slack space you linked to rustbridge.slack.com says it requires an invitation.
1
You can use this link to get an automatic invitation: rust-bindings-slackin.heroku… — all are welcome!
1
Replying to @dfrasca80 @tokio_rs
Congrats on your native module! Feel free to join the community Slack if you'd like help optimizing the code. We can also look into making an example of using Tokio with Neon.
1
Hey, @RustNeon, all your examples are based on neon = "0.3.3" while you are at version = "0.9.1," and many examples are not working. Could you please review them? Would be very grateful for someone trying to learn your framework without a lot of documentation.
1
1
Keep them around are very useful to understand how to do things that are not documented at all with the new version
1
Replying to @RustNeon
I think your website is pointing to the legacy example. From the legacy, I managed to find the syntax for the new version, but you know it is not easy 😁
1
1
Good catch! Working on fixing that now… github.com/neon-bindings/web…
1
1
Replying to @dfrasca80 @RustNeon
Actually, I was in the legacy examples for some reason.
github.com/neon-bindings/exa…
github.com/neon-bindings/exa…
the legacy is more useful
1
Replying to @DTRomesh @gitconnected
Nice article, thank you for sharing! BTW, the IRC channel is no longer active; these days we encourage anyone interested in community discussion to join our Slack channel. Thanks again for the great writeup!
1
Replying to @kdy1dev @Brooooook_lyn
For a compiler for the web ecosystem it could be useful to offer both prebuilt binary for ease of use + maximum performance, but also offer a Node API for programmatic use cases. Either @RustNeon or napi-rs should work for you & we’d be happy to help if you have questions!
A safer #cratechallenge: whoever fixes the most @rustlang safety bugs in their crate found by github.com/sslab-gatech/Rudr… wins








