The longer I go the more I have actually come to appreciate the way Packagist works for the PHP community, there are lots of cool things it does that I wish NPM or other registries did by default, like forcing you to package from a source repository, so that you can't upload a different artifact from what you keep in source control.
crates.io also only distributes source code.
How does a close source package work? Depending on the language its not super helpful, but a package that is closed source should be possible.