You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently Zephyr has source code compatibility with applications that use zephyr, but this is insufficient to be able to define bindings on top of Zephyr for supporting applications written in other languages that would run on zephyr and that could potentially use a completely different build process and compiler.
While Zephyr does define many system calls, there currently does not seem to exist a well defined application interface that does not require the application to be compiled as part of the same build process as the rest of the system.
This problem occurs when trying to interface rust and also erlang atomvm to zephyr.
Describe the solution you'd like
I would like a well defined application interface similar to linux system calls but possibly more "flat" to avoid incuring unnecessary overhead by too many high level abstractions. This interface should not be dependent on macros and other preprocessor definitions that require building with zephyr headers. It should be enough to just link to zephyr.
Not sure if aiming for full posix compliance would solve enough issues. It would at least be good to be able to link seamlessly to code that is built separately outside of zephyr such as when building rust code to object code that is then linked to zephyr.
Possibly if there is some easy way to generate bindings for other languages solely by extracting and post processing system call definitions then this may be a workable solution. Not sure how to proceed here though so thankful for some suggestions.
Describe alternatives you've considered
Writing wrappers for some zephyr functions that are to be exposed to "application" code written in a different language: requires way too much work and doesn't work very well since some zephyr stuff is implemented using macros.
#57086 very recently added the Linkable Loadable Extensions (LLEXT) subsystem, and it is now in the just released Zephyr 3.5 (albeit still at a very experimental stage).
Would this eventually fit your use case?
Even #57086 would also benefit from a stable ABI at least to some extent so that extensions could work across some subset of zephyr versions.
I don't think we can assume Zephyr will have a stable syscall interface at any point in the future as its not the primary interface. Syscalls are easy to add and remove, and doing so changes the syscall table entirely. We would need instead to have C function and object symbols remain stable. That is a difficult task.
Is your feature request related to a problem? Please describe.
Currently Zephyr has source code compatibility with applications that use zephyr, but this is insufficient to be able to define bindings on top of Zephyr for supporting applications written in other languages that would run on zephyr and that could potentially use a completely different build process and compiler.
While Zephyr does define many system calls, there currently does not seem to exist a well defined application interface that does not require the application to be compiled as part of the same build process as the rest of the system.
This problem occurs when trying to interface rust and also erlang atomvm to zephyr.
Describe the solution you'd like
I would like a well defined application interface similar to linux system calls but possibly more "flat" to avoid incuring unnecessary overhead by too many high level abstractions. This interface should not be dependent on macros and other preprocessor definitions that require building with zephyr headers. It should be enough to just link to zephyr.
Not sure if aiming for full posix compliance would solve enough issues. It would at least be good to be able to link seamlessly to code that is built separately outside of zephyr such as when building rust code to object code that is then linked to zephyr.
Possibly if there is some easy way to generate bindings for other languages solely by extracting and post processing system call definitions then this may be a workable solution. Not sure how to proceed here though so thankful for some suggestions.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: