Andy-Python-Programmer / aero

Aero is a new modern, experimental, UNIX-like operating system following the monolithic kernel design. Supporting modern PC features such as long mode, 5-level paging, and SMP (multicore), to name a few.
https://aero.andypy.dev
GNU General Public License v3.0
1.16k stars 48 forks source link

replace aero.py with rusty build system #81

Closed jwpjrdev closed 2 months ago

jwpjrdev commented 1 year ago

this implementation will hopefully be faster and more maintainable

important things:

note to self: don't forget to add a comment referencing this gist to the logging functions.

48cf commented 1 year ago

i just want to point out that aero used to have a build system written in rust and it was replaced by the python script due to how long the initial build took, primarily because of the fact we download stuff from the internet and it used reqwest if i'm not mistaken, so please consider bringing in the least amount of crates possible :')

jwpjrdev commented 1 year ago

that's the goal! aiming to use the smallest, fastest crates i can find

jwpjrdev commented 1 year ago

won't be working on this until the 1st, ran out of hours on Gitpod 😢 i've written a good portion of it, just can't do anything with it yet

jwpjrdev commented 1 year ago

by the way, currently, just using gumdrop and termcolor. if colour isn't needed, i'll ditch termcolor.

48cf commented 1 year ago

gumdrop seems fine, you can get rid of termcolor as it seems to bring in a lot of winapi bullshit which is basically useless because aero doesn't have first class support for windows and it's a hefty crate (>1 MB), just implement ansi colors yourself with ansi escapes, it's very easy :')

48cf commented 1 year ago

additionally the newer windows terminal support ansi escapes just fine so it shouldn't be a problem, i'm not sure if termcolor gates the winapi dependency behind a feature, but if it does then it might be wise to disable it

jwpjrdev commented 1 year ago

cool, i'll look into that

jwpjrdev commented 1 year ago

looks like it only uses it when the compile target is windows but it's still pretty hefty. https://github.com/BurntSushi/termcolor/blob/677f98b26a1b52f72303e1c9dfdc9ef68def8014/Cargo.toml#L21-L22

jwpjrdev commented 1 year ago

accidentally started the workspace from master instead of rust-build and had to force push like a fool 🥲

ghost commented 1 year ago

Just a comment, I think it's reasonable to say leaving out Windows/cygwin/etc compatibility for now should probably be fine, since anything WinApi is a massive pain and tends to add a lot of cruft/bloat. I'm going to take a look at what you have, and maybe throw some tests your way :)

48cf commented 1 year ago

Just a comment, I think it's reasonable to say leaving out Windows/cygwin/etc compatibility for now should probably be fine, since anything WinApi is a massive pain and tends to add a lot of cruft/bloat. I'm going to take a look at what you have, and maybe throw some tests your way :)

I totally agree with that comment, the days of MSYS/Cygwin are numbered ever since WSL became a thing (and Windows 7 is EOL.) I don't think crippling our build system just to support exotic setups is a reasonable choice. Let's just keep it simple :^)

jwpjrdev commented 1 year ago

i need to pull some upstream changes but i cba yet

Andy-Python-Programmer commented 2 months ago

This has now been resolved as aero.py is replaced with make.