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

how to embed in a c#/f# peoject? #167

Closed
sep2 opened this issue Jul 10, 2021 · 2 comments
Closed

how to embed in a c#/f# peoject? #167

sep2 opened this issue Jul 10, 2021 · 2 comments
Labels
documentation Updates or improvements to the documentation

Comments

@sep2
Copy link

sep2 commented Jul 10, 2021

📚 Documentation

The readme said there is a port in c# which we can use to embed metacall, I assume it is a nuget package, but could not find the related docs/repo.

btw on the use case I am building an online game server that allows players to upload their plugin scripts to extend the game logic.

@sep2 sep2 added the documentation Updates or improvements to the documentation label Jul 10, 2021
@viferga
Copy link
Member

viferga commented Jul 10, 2021

The C# Loader and Port has been a bit discontinued and it was one of the first ones that was implemented. It works but needs improvement ( #123 ). By the way here's the NuGet package: https://www.nuget.org/packages/metacall

If you are interested in the source, you can find it here:

It may need to update the project because it was coded for NetCore 1.0, when it was in experimental version. The Loader has been updated to version 5 (although it has still some minor problems) but the Port has remained untouched.

Is this enough for you? Do you need documentation? Please feel free to ask for anything you need.

Right now C# only supports static methods from classes, and they are treated as functions (instead of fully supporting classes). But I think this should be enough for your use case, at the end you will need a static method for your scripts as an entry point, and this is exactly what it's supported.

If you are interested in contributing in order to improve the MetaCall C# support it would be great. I am not very skilled in C# and there's a lot of work in other parts to be done right now.

I hope this helps.

@sep2
Copy link
Author

sep2 commented Jul 10, 2021

Thank you for the reply, that clears a lot!

@sep2 sep2 closed this as completed Jul 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Updates or improvements to the documentation
Projects
None yet
Development

No branches or pull requests

2 participants