{"action":"created","issue":{"url":"https://api.github.com/repos/micropython/micropython/issues/583","labels_url":"https://api.github.com/repos/micropython/micropython/issues/583/labels{/name}","comments_url":"https://api.github.com/repos/micropython/micropython/issues/583/comments","events_url":"https://api.github.com/repos/micropython/micropython/issues/583/events","html_url":"https://github.com/micropython/micropython/issues/583","id":33006499,"number":583,"title":"Supporting dynamically loaded native (machine code) modules","user":{"login":"pfalcon","id":500451,"avatar_url":"https://avatars.githubusercontent.com/u/500451?v=3","gravatar_id":"","url":"https://api.github.com/users/pfalcon","html_url":"https://github.com/pfalcon","followers_url":"https://api.github.com/users/pfalcon/followers","following_url":"https://api.github.com/users/pfalcon/following{/other_user}","gists_url":"https://api.github.com/users/pfalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/pfalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfalcon/subscriptions","organizations_url":"https://api.github.com/users/pfalcon/orgs","repos_url":"https://api.github.com/users/pfalcon/repos","events_url":"https://api.github.com/users/pfalcon/events{/privacy}","received_events_url":"https://api.github.com/users/pfalcon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/micropython/micropython/labels/prio-low","name":"prio-low","color":"ffffff"},{"url":"https://api.github.com/repos/micropython/micropython/labels/rfc","name":"rfc","color":"FF66CC"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2014-05-07T17:28:41Z","updated_at":"2015-02-18T09:46:27Z","closed_at":null,"body":"This is informational ticket to refer people too.\r\n\r\nCurrently, MicroPython doesn't have analog of \".pyd\" modules of MicroPython - i.e. native shared/dynamic libraries compiled from C code.\r\n\r\nIt might be more or less easy to add such support for particular port, and contrary, quite not easy to add support *for MicroPython*, i.e. which would work consistently across all ports and builds.\r\n\r\nCulprits are are:\r\n1. Too big differences between various dynamic library formats, so cannot rely on any \"advanced\" features, and should provide \"least common denominator\" for API symbols lookup (which is an array of function pointers, passed to module init function).\r\n2. Baremetal ports don't have OS-provided dynamical loading support at all, so will need to implement own loader, and then provide build support for corresponding binary format.\r\n3. Lack of public API in MicroPython. Or rather, currently all APIs are \"public\" and are not stable.\r\n"},"comment":{"url":"https://api.github.com/repos/micropython/micropython/issues/comments/74837598","html_url":"https://github.com/micropython/micropython/issues/583#issuecomment-74837598","issue_url":"https://api.github.com/repos/micropython/micropython/issues/583","id":74837598,"user":{"login":"danicampora","id":7749335,"avatar_url":"https://avatars.githubusercontent.com/u/7749335?v=3","gravatar_id":"","url":"https://api.github.com/users/danicampora","html_url":"https://github.com/danicampora","followers_url":"https://api.github.com/users/danicampora/followers","following_url":"https://api.github.com/users/danicampora/following{/other_user}","gists_url":"https://api.github.com/users/danicampora/gists{/gist_id}","starred_url":"https://api.github.com/users/danicampora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danicampora/subscriptions","organizations_url":"https://api.github.com/users/danicampora/orgs","repos_url":"https://api.github.com/users/danicampora/repos","events_url":"https://api.github.com/users/danicampora/events{/privacy}","received_events_url":"https://api.github.com/users/danicampora/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T09:46:27Z","updated_at":"2015-02-18T09:46:27Z","body":"> Implement a proper ABI with all required bindings to the uPy runtime, possible merged with the stuff in py/nativeglue.c.\r\n\r\nYes, we can add a pointer to `mp_fun_table`, but I think we will need more stuff than what is included there... stuff like `mp_obj_get_int` and friends, or is there a better way around it?"}}