sass / embedded-host-node

A Node.js library that will communicate with Embedded Dart Sass using the Embedded Sass protocol
MIT License
143 stars 26 forks source link

Improve the performance of detecting linux-musl platform by parsing ELF #315

Closed ntkme closed 1 month ago

ntkme commented 1 month ago

Closes #314

ntkme commented 1 month ago

I mostly reused the variable names from the linux kernel code: https://github.com/torvalds/linux/blob/HEAD/include/uapi/linux/elf.h. Idea here is for whoever going to work on this code they can refer to the kernel API document and find the reference without too much effort:

@nex3 Now I have renamed a few of them, and changed the snake case to camel case, let me know if you have any preferences on these naming.

nex3 commented 1 month ago

I think it's better to have explicit names than names that exactly match the kernel, especially since the explicit names are just expanded versions of the names from the kernel anyway so figuring out that they correspond won't be too hard for a reader. I'd also like to avoid single-letter affixes with unclear meaning like e, p, and z.