简体   繁体   English

从 Rust 使用 nodejs 库

[英]Consume nodejs library from Rust

I need to use an existing nodejs library from my Rust project and I am thinking of adding the node library as a git subtree and execute node whatever.js commands from Rust.我需要从我的锈项目使用现有的库的NodeJS和我想到的是添加节点库作为一个git子树和执行node whatever.js锈菌的命令。 But this doesn't seem ideal to me...但这对我来说似乎并不理想......

Is there any better way of embedding a nodejs library in my Rust project so I can call functions from that library in my Rust application?有没有更好的方法在我的 Rust 项目中嵌入nodejs库,以便我可以在我的 Rust 应用程序中调用该库中的函数?

最终在 Rust 和 Node 之间使用 IPC。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM