Replies: 4 comments 6 replies
|
I'm in favor of running in several languages and versions. But how to do that? In node I know, but how would you do it in Go? |
|
Few things are as annoying as asking the user to replicate your dev environment to get your code running. If one of zot's main draws is that it's a statically linked binary that just works, the same should be true of zot's extensions. |
|
Perhaps a compromise could be that zot supports wasm extensions and this is the recommended path for publicly distributed extensions? Still support extensions in any language that can be executed on users system. |
|
A possible way to address the runtime/version problem would be to make GitHub Releases a first-class extension distribution mechanism, while keeping local-directory and Git installs for development. Proposed commands: zot ext install github.com/owner/repo
zot ext install github.com/owner/repo@v1.2.3
zot ext update <name>
zot ext update --allAn extension release could publish platform-specific assets such as: plus an Installed extensions should be recorded in the existing {
"extensions": {
"weather": {
"source": "github.com/acme/zot-weather",
"version": "v1.2.3",
"commit": "abc123",
"asset": "weather_1.2.3_linux_amd64.tar.gz",
"sha256": "..."
}
},
"extensions_check_for_updates": true
}This would also give The install flow would be:
This would let extension authors ship prebuilt binaries and avoid imposing Go/Node/Python version requirements on users, while preserving the existing source-based workflows for development. Security-wise, release installation should require HTTPS, verify checksums, reject unsafe archive entries, avoid install hooks/package-manager execution, and show the selected repository, release, and asset before installation. Checksums provide integrity but not independent publisher authentication, so signed releases or Sigstore attestations could be added later. Implementation-wise, the existing download, checksum, and archive helpers in the zot updater could be reused for extensions, with GitHub release resolution and safe extraction factored into shared code. Tests should use a local HTTP server and cover platform selection, checksum failures, malformed archives, rollback behavior, settings reconciliation, and disabled update checks. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I saw you have a extension page https://www.zot.sh/docs/extensions
so i pick a whole bunch and loaded zot up.
then i ran zot.
The major problem i had is that some of the extensions are written in golang, each with differing required runtimes. (so they didn't launch and zot never finished loading)
It's awesome that i can use what ever language i want for extensions.
What i'd like to discuss here is how does zot execute those extensions?
in a subshell? some other way?
As a heavy mise user, my user land has a mise.toml with golang 1.18 in it. (this is why the extensions crashed)
I'm wondering if we can encourage people to use mise and also if adding a mise.toml to the extension root would allow the extensions to all run with their own language runtime required.
If zot executes plugins via subshell in the extension dir, then this will already happen now.
tldr:
encourage people to lean on mise, and provide mise.toml with tooling required in their extensions.
All reactions