Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libc/POSIX compatibility roadmap #48

Open
4 of 13 tasks
treeswift opened this issue Oct 21, 2023 · 2 comments
Open
4 of 13 tasks

libc/POSIX compatibility roadmap #48

treeswift opened this issue Oct 21, 2023 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request licensing

Comments

@treeswift
Copy link
Contributor

treeswift commented Oct 21, 2023

Mostly writing it down for myself to have a clear (and shareable) TODO list.

Our "*nix-like" toolkit will most likely be provided by ToyBox (public domain equivalent license) and our remote terminal implementation of choice is openssh-portable (3-clause BSD license or freer) ported by Microsoft heroes and tuned for MinGW by ourselves. The latter uses its own POSIX-on-Windows compatibility layer; for the needs of the former, our intent is to complement MinGW (and the underlying Microsoft CRTs) in the least invasive way possible.

Subsystems and components intended for general use (public domain)

These components will be consumed by userspace, user-facing, mostly GUI applications. While incorporation of code under non-PD permissive licenses should generally be OK during development/porting of such packages, the lodestar goal for user-facing apps should be "original license for the application package, OS or public domain all the way down". (A rule of thumb for exceptions is that dependencies qualify for an exception if they are extremely hard to overlook — e.g. "dependency D1 is the original application framework" (Qt, Electron…) or "dependency D2 is the rendering API provider" (Mesa, ANGLE…).)

  • POSIX user and group API, i.e. pwd.h and grp.h — provided by libwusers
  • POSIX file descriptor API — provided by CRT, MinGW and libfatctl
  • POSIX/Linux-like *xattr() API — provided by libxxxattr
  • POSIX/Linux-like I/O notification APIs — provided by libchoreo
  • POSIX *chown*() APIs — provided by libowners
  • POSIX virtual memory management API, i.e. sys/mman.h — provided by libmemmap
  • limited Berkeley sockets — provided by OS (WS2) (ws2fwd only adds one-line forwarding headers).
  • advanced ("sigaction") signal API — TODO build on top of VEH and process API.
  • event logging ("syslog") — TODO stub with stderr output (short term), come up with something like OSX Console (long term) with most important notifications promoted to Event Log.
  • volumes, filesystems and mount points — TODO provide limited, view-only access.
  • /proc (for debugging tools) — MOREINFO provide on a per-process basis, most likely with embedded named pipe servers.

win32iocompat (the OpenSSH-on-Windows porting layer)

Components aware of the win32iocompat layer (alternative names: win32compat, posix_compat) are intended for development and system administration tools. They must be available under a 3-clause BSD or a freer license.

  • terminal emulation (termios.h) — currently present in win32iocompat; troubleshoot and possibly extract. (Check the box when the default incoming session is stable.)
  • complete Berkeley socket API — extract for select consumers if needed.
@treeswift treeswift added documentation Improvements or additions to documentation enhancement New feature or request licensing labels Oct 21, 2023
@treeswift treeswift self-assigned this Oct 21, 2023
@treeswift
Copy link
Contributor Author

#19 depends on this issue.

@treeswift
Copy link
Contributor Author

CLang 14 supports #pragma comment(lib, "libname...") — we can (and probably should) use it to inject link-time dependencies for complemented standard headers (such as pwd.h, grp.h, paths.h etc.) without injecting linker flags from the top.

Will try with libwusers first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request licensing
Projects
None yet
Development

No branches or pull requests

1 participant