HeyPuter / phoenix

🔥 Puter's pure-javascript shell
https://puter.com/app/terminal
GNU Affero General Public License v3.0
90 stars 15 forks source link

Missing core utilities #43

Open AtkinsSJ opened 7 months ago

AtkinsSJ commented 7 months ago

The POSIX spec lists a whole lot of different utilities, some of which are not so relevant (I'm looking at you, fort77). Here's a list I've come up with, roughly grouped into categories.

Text processing

Comparison

Terminal things

User/group/permission related

Other ones requiring platform support

Missing functionality

Kreijstal commented 6 months ago

you miss cc, a c compiler

AtkinsSJ commented 6 months ago

you miss cc, a c compiler

Yeah that's one of the ones I skipped. A C compiler is not useful for Puter when it can't (yet?) run C programs. (Though, people are working on x86 emulation so who knows.)

This was originally a list I put together for my own notes, but decided to make it public instead. So what went on it was my opinion really. Feel free to implement anything not on this list if it makes sense. :^)

Kreijstal commented 6 months ago

you miss cc, a c compiler

Yeah that's one of the ones I skipped. A C compiler is not useful for Puter when it can't (yet?) run C programs. (Though, people are working on x86 emulation so who knows.)

This was originally a list I put together for my own notes, but decided to make it public instead. So what went on it was my opinion really. Feel free to implement anything not on this list if it makes sense. :^)

Most computers can't run C directly, that's why they compile it :) You'd compile C into wasm, or into JavaScript ala emscripten. That is not the hard part, the hard part is implementing the posix C extensions. Essentially we'd need to embed emscripten into puter.

Kreijstal commented 6 months ago

but maybe this is obviously too ambitious, so I would say, get us a wasm assembler and we will start from there

KernelDeimos commented 6 months ago

In discussions with the community (mostly via Discord at the moment) we seem to be leaning toward the direction of x86 emulation rather than something like emscripten. With this approach Puter's own filesystem could be mounted into something like a headless Archlinux instance using our FUSE driver.

Kreijstal commented 6 months ago

In discussions with the community (mostly via Discord at the moment) we seem to be leaning toward the direction of x86 emulation rather than something like emscripten. With this approach Puter's own filesystem could be mounted into something like a headless Archlinux instance using our FUSE driver.

assuming you get x86 emulation you'll still have to translate the posix syscalls, unless you emulate the whole OS (but then Id just visit v86 or JSlinux), also it will be slower. since you do have to do that, you can support native wasm/js anyway