Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open .ndll files? #246

Open
krigeta opened this issue Nov 8, 2021 · 1 comment
Open

Open .ndll files? #246

krigeta opened this issue Nov 8, 2021 · 1 comment

Comments

@krigeta
Copy link

krigeta commented Nov 8, 2021

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

@tobil4sk
Copy link
Member

tobil4sk commented Oct 2, 2022

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 tobil4sk mentioned this issue Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants