{"action":"created","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/3936","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/3936/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/3936/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/3936/events","html_url":"https://github.com/godotengine/godot/issues/3936","id":138710781,"number":3936,"title":"add dynamic linker support","user":{"login":"mohaalak","id":891975,"avatar_url":"https://avatars.githubusercontent.com/u/891975?v=3","gravatar_id":"","url":"https://api.github.com/users/mohaalak","html_url":"https://github.com/mohaalak","followers_url":"https://api.github.com/users/mohaalak/followers","following_url":"https://api.github.com/users/mohaalak/following{/other_user}","gists_url":"https://api.github.com/users/mohaalak/gists{/gist_id}","starred_url":"https://api.github.com/users/mohaalak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohaalak/subscriptions","organizations_url":"https://api.github.com/users/mohaalak/orgs","repos_url":"https://api.github.com/users/mohaalak/repos","events_url":"https://api.github.com/users/mohaalak/events{/privacy}","received_events_url":"https://api.github.com/users/mohaalak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/godotengine/godot/labels/discussion","name":"discussion","color":"ee77ee"},{"url":"https://api.github.com/repos/godotengine/godot/labels/feature%20proposal","name":"feature proposal","color":"1144ff"},{"url":"https://api.github.com/repos/godotengine/godot/labels/topic:core","name":"topic:core","color":"ffdd44"},{"url":"https://api.github.com/repos/godotengine/godot/labels/topic:porting","name":"topic:porting","color":"ffdd44"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2016-03-05T19:26:29Z","updated_at":"2016-06-15T17:02:34Z","closed_at":null,"body":"Why do we need it?\r\n===============\r\n\r\nwith the work of @reduz and alket soon we can have an asset sharing  ( addon ) but the missing system is that this addons is all in gd script but there are so many works that can be done in modules like add Admob,IAP,OpenCV,CameraCaputre,VRsupport and so many more , this modules should be compiled and it's scary for beginners just to clone the godot repo add the module then download dependencies and compile it but think about it if the modules is compiled and can be added to engine it will be great.\r\n\r\nProblems\r\n=========\r\n\r\n- first of all that this modules should be compiled with compilers that the godot was compiled\r\n- every version of godot can load just the modules for that version\r\n- our last problem how can we implement it that it will be simple and easy to use both for module developers and engine users\r\n\r\nmy solution is that we just support those release on steam and in site the stable versions and if someone wants a custom version he should download the modules code and compile it themselves, for compatibility issue the modules should have a supported version and for different platform the compiled version should exist.\r\n\r\n\r\n@akien-mga I will appreciate it if you  add feature request and discussion label to this issue \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/godotengine/godot/issues/comments/226252150","html_url":"https://github.com/godotengine/godot/issues/3936#issuecomment-226252150","issue_url":"https://api.github.com/repos/godotengine/godot/issues/3936","id":226252150,"user":{"login":"reduz","id":6265307,"avatar_url":"https://avatars.githubusercontent.com/u/6265307?v=3","gravatar_id":"","url":"https://api.github.com/users/reduz","html_url":"https://github.com/reduz","followers_url":"https://api.github.com/users/reduz/followers","following_url":"https://api.github.com/users/reduz/following{/other_user}","gists_url":"https://api.github.com/users/reduz/gists{/gist_id}","starred_url":"https://api.github.com/users/reduz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reduz/subscriptions","organizations_url":"https://api.github.com/users/reduz/orgs","repos_url":"https://api.github.com/users/reduz/repos","events_url":"https://api.github.com/users/reduz/events{/privacy}","received_events_url":"https://api.github.com/users/reduz/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T17:02:34Z","updated_at":"2016-06-15T17:02:34Z","body":"I'll revive this thread with a proposal. Let me know what you guys think about it.\r\n\r\nFirst a bit of context:\r\n\r\nDistributing dlls/so files in Godot as external modules is to difficult due to the many different compilers, versions, ABI changes, etc. In a bit more detail.\r\n\r\n1) C++ is terrible for binary compatibility in shared objects, the ABI is different between compilers and compiler versions.\r\n2) Even if the same compiler was used, C++ requires symbols (class) sizes to be the same in order to link properly\r\n\r\nThis makes adding extra functionality as a .dll linking against Godot too difficult to even attempt.\r\n\r\nAn idea lurked around about creating a more stable mirrored C++ API that replicates API functions using a safer API, but this would only solve 2), not 1).\r\n\r\nSo, how about the following? Some functionality must of course be used as an extension, such as if you want to add a module that might replace the physics engine, but for the large amount of libraries and other stuff that might be nice to bind (ie, SQLite, ODBC, DBUS, Kinect, FMOD, whathever), having access via the script API to this would be fine. I think this could be solved via the following:\r\n\r\n1) Create a very simple dynamic API via C, not C++ which can access most godot functionality, but only provide a minimal API. \r\n2) C ABI is _much_ more stable and compatible between compilers and compiler versions than C++.\r\n3) C ABI would be simple and access most of Godot via the reflection API instead of headers, ie\r\n\r\n```c\r\ngodot_class c = class_db_get_class(\"Node2D\");\r\ngodot_instance ins = godot_instance(c);\r\ngodot_call_method( ins, \"set_pos\", godot_vec2(10,22) );\r\n```\r\n\r\nthe idea would be to simply add scripts using C, not sure how this would work exactly (CScript could be a class where you edit which which C class to instance) .\r\n\r\nThis would allow us to bind all sort of C and C++ libraries without any risk, given the ABI will always be C.\r\n\r\nWhat do you think?\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"reduz"}}