gorules / zen-dotnet

Open-source business rules engine for dotNet
5 stars 0 forks source link

C# bindings #1

Open alentor opened 4 months ago

alentor commented 4 months ago

Hello,

Could you please provide the C# csbindgen bindings?

I encountered an issue where the included libzen_ffi seems to be compatible only with darwin_arm64, preventing me from running on darwin_amd64.

Thank you.

stefan-gorules commented 4 months ago

Hi @alentor,

We're not using csbindgen directly, instead you would compile bindings/c for cdylib. https://doc.rust-lang.org/reference/linkage.html

In turn you would get .so file on Linux/Mac and .dll on Windows respectively.

ivanmiletic commented 4 months ago

We'll prepare a workflow for building dylib for dotnet

alentor commented 3 months ago

@ivanmiletic that would be great, Couldn't compile it on windows due to quickjs..

Imma try compiling on Mac when I'm home..

stefan-gorules commented 3 months ago

Hi @alentor, please see:

https://github.com/gorules/zen/pull/228/files as source for generating dylib. What's missing now is CustomNodeLoader and some extra logic that we'd like to cover similar to GoLang.

Let me know if above is buildable and makes sense. Appreciate it!

Edit: See also #2