node.js
Node.js と Rust による native code のマーシャリング手法は NEON と node-ffi-napi の2種類が現時点で有力です。マーシャリング部分のコストの特徴を大雑把に掴むため雑なベンチマーキングをしました。 Note: 理論的にはもう1つ N-API を直接リンクして cd…
「RustのcdylibをバックエンドにElectronをフロントエンドにする」プロジェクトを3秒くらいでお手軽作れるcargo-generateできるプロジェクトテンプレートを公開しました。 template-rust-backend-with-electron-frontend https://github.com/usagi/template-…
今回のメモの Node.js は: node -v v13.5.0 です。先ずは Node.js 初心者らしく npm i ffi して死にました: npm i ffi ほか多数のエラーを観測し、死んでしまいました。☠ https://www.npmjs.com/package/ffi どんどん使われなくなっているので何か代替に置き…
例によって唐突に結果ぺたり。 LH-MAIN /tmp% node benchmark_const.js N = 1000000000 9678 [ms] cost of nothing 9379 [ms] cost of 1000000000-th bind var from var 10854 [ms] cost of 1000000000-th bind var from const 11190 [ms] cost of 100000000…