(github.com)
Back in the distant past I wrote some really big ARM 32 assembly projects. 64 bit ARM is really very similar!
I had a look through the code. Some ENTRY/EXIT macros to help with the drudgery of save restore registers & stack frame would probably help. Also some register renaming would help readability (eg if a register points to incoming data throughout a subroutine rename it pdata).
I salute your effort and please enjoy the core dumps :-)
Impressive, but that second part worries me. I hope one day AI security scans upon commit (or integrated in the IDE) will alleviate that risk.
What's the current security gold standard for web servers? Hiawatha? https://hiawatha.leisink.net/
Edit: or learning arm64 assembly :)
insane! i wonder how many times you have spent to learn about them!
Question/critique. Isn't getting the mime type by file extension a bit windowsy? Would it not be easier to read the magic number when you're at the assembly level?
That doesn't work well with text documents which won't have any kind of magic number. So now you're doing some heuristics to determine is this text/plain, text/html, text/svg? You're pretty much just guessing at that point.
A good number of file formats out there are just Zip files with a particular structure. JAR files, docx - so relying on magic numbers doesn't really work for those, either.
Also to service a HEAD request you'd have to open the file and read a few bytes that you just discard.
If you just do it by extensions you don't need to read files at all or perform heuristics, and no ambiguity for what mimetypes to use for text documents, zip-based formats, etc.
RISC-V is. I am self-hosting many of my internet thingies. I plan to move to RISC-V only hardware and to rewrite my internet software directly in mono-threaded paranoid RISC-V assembly.
Why is that a problem? Google search returns 3K page arm64 ISA manual. What else do you need to write asm?
I think with RISC-V if you wanted to design your own chips and stuff you can just do it, whereas ARM doesn't let you do that.
I'm not about to build my own chips so it doesn't matter all that much to me but I understand where the person is coming from. They'd rather write assembly for the more open architecture.