neko icon indicating copy to clipboard operation
neko copied to clipboard

Open .ndll files?

Open krigeta opened this issue 4 years ago • 1 comments

Hello, how can we open the .ndll files using this?

krigeta avatar Nov 08 '21 19:11 krigeta

Just to explain this for anyone else who finds this issue, .ndll files are dynamically linked libraries for the neko vm. To load a function from an ndll file when targetting neko via haxe you can use this function: https://api.haxe.org/neko/Lib.html#load

For example, to load the regexp_match function from regexp.ndll, which takes 4 function arguments, you would do:

static var regexp_match = neko.Lib.load("regexp", "regexp_match", 4);

If for some reason you want to load an ndll file via the neko language, then you can use the $loader.loadprim() function which is documented here: https://nekovm.org/doc/ffi/#a-small-sample

tobil4sk avatar Oct 02 '22 14:10 tobil4sk