Writing modules in Rust?
Posted:
Mon Jan 02, 2017 10:00
by burli
Is it possible to write modules like a mapgen or other Mods in Rust? What are the requirements?
Re: Writing modules in Rust?
Posted:
Mon Jan 02, 2017 12:48
by rubenwardy
You either need to:
Rewrite the lua api cpp code in src/scripting/ to support multiple languages including Rust
or
Run Rust binaries from Lua:
https://github.com/tomaka/hlua#creating-a-lua-module
Re: Writing modules in Rust?
Posted:
Mon Jan 02, 2017 13:22
by burli
That's if I want to write a mod. And I'm not sure if this works because it is for Lua 5.2. Nothing about luajit so far
But what if I want to write a native mapgen, e.g. by replacing the
Boilerplate Code with Rust?
Re: Writing modules in Rust?
Posted:
Mon Jan 02, 2017 13:26
by rubenwardy
Re: Writing modules in Rust?
Posted:
Mon Jan 02, 2017 15:29
by burli
Is the Boilerplate still valid code? Can't find any registerMapgen Function in the current dev
Re: Writing modules in Rust?
Posted:
Sun Jan 08, 2017 20:42
by kaadmy
Another language I've found recently is Wren (
http://wren.io/). It's not as fast as Lua (without JIT), but it's simpler to use and has more refined syntax and layout that Lua/Rust IMO.
Re: Writing modules in Rust?
Posted:
Sat Jan 14, 2017 16:00
by trev
Wow. Wren looks like a cool language. The documentation doesn't seem finished, though. The section on the C API says "TODO", so I guess we're on our own there.
Re: Writing modules in Rust?
Posted:
Sun Jan 15, 2017 01:16
by kaadmy
The header file for the C-side API is commented nicely, it includes enough information to use it.