10-26-2014, 01:06 AM
What about the hooks? We still end up having to thunk everything that is currently thunked with lua. Also we need to be very careful about versioning. You really need to ensure every plugin uses the exact same MCServer.dll.
(10-26-2014, 06:24 AM)worktycho Wrote: [ -> ]cPlugin would still need to be thunked to the C coding convention for calls to MCServer if plugins are compiled client side. Otherwise we have to ship a compiler to ensure the layouts, calling convention, and name mangling are the same.Yes, in the first post I suggested shipping a compiler with MCServer... did you read it?
(10-26-2014, 06:24 AM)worktycho Wrote: [ -> ]Also what is to stop people using methods that arn't part of the API? For lua and squirrel we handled this by not doing binding code for those methods. For C++ we either need wrapper classes for every class or to expose every virtual method and every field.Why would you want to stop people from accessing parts that aren't part of the API? This is actually a good thing in my opinion.
(10-27-2014, 08:31 AM)worktycho Wrote: [ -> ]Shipping a compilier is an interesting idea, but c++ compilers are big.Yes it's not the best idea
(10-27-2014, 08:31 AM)worktycho Wrote: [ -> ]As for how linux handles compatibility is either C interfaces, or compile everything with the distros specified compiler. Unfortunately specifying a particular compiler tends not to work across multiple distress/versions of a distro.How does the NVIDIA PhysX SDK do this then? It only has a C++ interface in the headers without function pointers, just classes with virtual functions and it supplies precompiled .a and .so files.
(10-27-2014, 08:31 AM)worktycho Wrote: [ -> ]The reason you want to stop people using parts that aren't part of the API is because otherwise people complain when their plugin broke because you refactored something. Or changed the contract of a method.Well that's the risk plugin developers take when not sticking to the plugin API...
(10-27-2014, 08:04 PM)FakeTruth Wrote: [ -> ]How does the NVIDIA PhysX SDK do this then? It only has a C++ interface in the headers without function pointers, just classes with virtual functions and it supplies precompiled .a and .so files.They just risk breakage and hope that the compilers don't break compatibility in a way that breaks them
(10-27-2014, 08:04 PM)FakeTruth Wrote: [ -> ]That never stops the plugins users complaining when a plugin breaks(10-27-2014, 08:31 AM)worktycho Wrote: [ -> ]The reason you want to stop people using parts that aren't part of the API is because otherwise people complain when their plugin broke because you refactored something. Or changed the contract of a method.Well that's the risk plugin developers take when not sticking to the plugin API...
(10-27-2014, 09:19 PM)worktycho Wrote: [ -> ]So if a commercial project dares to take that risk, I'd say we can too(10-27-2014, 08:04 PM)FakeTruth Wrote: [ -> ]How does the NVIDIA PhysX SDK do this then? It only has a C++ interface in the headers without function pointers, just classes with virtual functions and it supplies precompiled .a and .so files.They just risk breakage and hope that the compilers don't break compatibility in a way that breaks them
(10-27-2014, 09:19 PM)worktycho Wrote: [ -> ]Let's just agree that there will always be complaining then, whatever we do(10-27-2014, 08:04 PM)FakeTruth Wrote: [ -> ]That never stops the plugins users complaining when a plugin breaks(10-27-2014, 08:31 AM)worktycho Wrote: [ -> ]The reason you want to stop people using parts that aren't part of the API is because otherwise people complain when their plugin broke because you refactored something. Or changed the contract of a method.Well that's the risk plugin developers take when not sticking to the plugin API...