r/ProgrammingLanguages • u/cflexer • Aug 11 '26
Help Package Manager design for Seal programming language
Hey guys, I have been working on Seal. This language is embeddable into C/C++ apps like Lua. You can create libraries for Seal in either Seal or C. I have been creating Game Framework recently. I want to create a package manager in future for Seal to let users upload their own packages to share with others, but I don't know about one thing. Just like other languages, Seal can load both Seal scripts and .so/.dll files at runtime when you import them. Publishing Seal scripts on package registry is easy, since it is just code, but I don't really know about how to publish C or dynamic library files tho. Package publishers can inject malicious stuff (like backdoor) in that code. What are real life examples to prevent that? At first I can read every file and check manually but if this project grows, maintaining that will be difficult. I can maybe create a report system but I cannot always rely on that too. What is the efficient solution for that?
For those interested, they can check Seal here: https://github.com/huseynaghayev/seal.git
View all comments
Show parent comment
4
u/oa74 Aug 12 '26
This (+ obligatory reminder of XZ exploit). Even a highly competent and completely well-meaning maintainer can be phished and/or bamboozled into accepting a patch that precipitates a supply chain attack. Binary distribution is serious business, and the risks are huge... the XZ binaries that got compromised weren't even executables: they were test data!
And this is to say nothing of situations like NPM's "left pad" fiasco a while back, or how notoriously bulky the npm packages folder can become. I see the crates situation as only marginally better than this.
I recently heard of an approach called "vendoring," wherein devs are expected to check in and commit the full set of upstream dependencies. It sounds archaic; however, I do see the advantages: it forces one to be cognizant of the (full, transitive) scale of the project's dependencies, and to be more thoughtful and deliberate about it.
I kind of like the idea of being able to reference remote Git repos directly; this offloads the distribution and hosting problem to existing third parties, and helps users keep the mindset of "I am importing a thrid-party project into my own," without going the full "vendoring" route.