DEV Community

Discussion on: Increase Rust and WebAssembly performance πŸš€πŸš€πŸš€

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€

So I have been tinkering with this mad project, and now I have learned that c++ is very verbose, do you find rust easier to write, manage and understand. I'm contemplating version 2 in rust with rlua.

GitHub logo acronamy / tidal-node

Node.js tidal is my experiment to transparently integrate Lua and Lua rocks (TODO) into a simple node library via WASM. *optionally* Want to require Lua scripts from Node and have it give you a table? Want to use node features in Lua?

Tidal Node

Lua was concieved as an embeded language, designed to compliment other languages, Tidal Node is a library which brings Lua to node.js through WebAssembly and c++.

Tidal Node is WIP and not production ready - however I welcome the one or two people in the world that want to use this to get those PR's coming in. You will find most of the emscripten compiler commands in npm package.json "config". There is also a installer task for Lua built in, everything is subject to change.

Requirements

compiler:

emscripten 1.38.30^

runtime:

node 10.0.0^

build tools:

  • make
  • curl

Commands

command purpose
npm start just run the project
npm run compile just compile
npm run install-lua download a copy of lua 5.3.5 and build with emscripten

What is working

  • Return flat Lua tables to node!

Highlights - "It's alive!"

  • Returning flat Lua Tables to JavaScript as Objects
  • Use module.exports and require…




Collapse
 
sendilkumarn profile image
Sendil Kumar

Thats a great idea πŸ‘πŸŽ‰ Yeah Rust is very concise. When you start you have wrap your head around the ownership, lifetimes and others. But when you get the feeling for that, then it will be much more easier and simpler to write.

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€

Thank you for your kind words. So there's no emscripten, sounds interesting! Okay well I'm gonna carry on getting this version done and rolled out before giving this a shot.