Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
/ neko_vm_binding Public archive

Neko Virtual Machine for C# 😺

License

Notifications You must be signed in to change notification settings

0xF6/neko_vm_binding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NekoVM

Neko Virtual Machine for C# 😺

For VM docs see NekoVM

Telegram

Deprecated as of 2021-09-09

Install-Package Ivy.NekoVM -Version 2.3.1-preview.6

🧬 Roadmap

  • Documentation
  • Improved API
  • Marshaling default types (without vabstract and vkind)
  • Marshaling POCO object
  • Marshaling neko std types
  • Marshaling non-primitive .NET types
  • More tests
  • Define global functions on runtime
  • Improved Thread support
  • Remove binaries from repo (automatization build for this)
  • dotnet global tools neko compiler
    • win-x64
    • osx-x64 (need help with testing)
    • linux-x64

💫 Fast start

using var vm = new Neko();

Load *.n modules

var module = vm.LoadModule(new FileInfo("module.n"));

Get exports from module

// module.n
$exports.GetInt = function() {
    return 42;
}
using var vm = new Neko();
var module = vm.LoadModule(new FileInfo("module.n"));
Console.WriteLine(module["GetInt"].Invoke()); // NekoInt32 { Value: 42 }

Threading

Each time you are going to use a VM API outside of the thread in which it was created, use the following code

vm.GuardBarrier()

Also, vm.ThreadID id managed thread in which it was created (see Thread.CurrentThread.ManagedThreadId)

Install compiler

dotnet tool install --global dotnet-nekoc --version 2.3.0-preview.2

About

Neko Virtual Machine for C# 😺

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published