spinframework / spinframework/spin

Statically linked Linux platform for plugins

Open
#2,961 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
6.5k
Forks
310
Avg merge
1d 20h
Merged PRs (30d)
24

Description

At the moment plugins are distinguished only as Linux/Mac/Windows and x64/ARM.

Because of this, the static-linux build of Spin resolves to Linux and typically ends up trying to load dynamically linked plugins, which doesn't end well.

One proposal is that we should support a new "static Linux" OS type for plugins. Some careful timing would be needed here, because existing versions of Spin will be unable to parse a new OS string, and would likely end up failing to load the manifest altogether. And of course we can't make them more forgiving because they're already out there.

Another possible way is to add a new optional field to PluginPackage e.g. "linkage" or something more general. I believe (but haven't yet confirmed) that existing Spin is wisely tolerant of unknown fields in a plugin manifest. Statically linked builds could then take this into account.

We would also need a way for a Spin instance to determine if it should use the static plugin. But if we can't determine this dynamically then we can just inject an indicator at compile time.

A final possibility is to do nothing in Spin but to encourage plugin authors to link their Linux builds statically. Although this depends on my naive assumption that static builds can run anywhere that dynamic ones can. Come at me, vengeful hubris, I am ready for your scorn.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by tracing plugin manifest parsing and how a static-linux Spin build selects plugins, then compare the proposed OS-type and optional-field approaches for compatibility with existing Spin versions. Done means an agreed design and a tested way for Spin to select compatible plugins.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust
Domain
build-system, devtools, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.