spinframework / spinframework/spin

Support workflows for creating library components inside a Spin application using them

Open
#2,982 4 comments 0 reactions 1 assignee View on GitHub

@tschneidereit is already working on this.

Since Mar 10, 2025.

enhancement needs-sip open for comment
Dominant language
Rust
Stars
6.5k
Forks
310
Avg merge
1d 20h
Merged PRs (30d)
24

Description

In #2970, I'm adding a template for a new library component, to be consumed by other components in the same application. @itowlson rightfully raised the question of how that fits into the scope of a Spin application; I'm opening this issue to discuss that question separately.

For context, Spin's current support for dependencies is focused on using existing library components, commonly retrieved from a registry. That is very similar to using a published library from crates.io, npmjs.com, etc.

What we don't have established workflows for is another common use case in other ecosystems: developing a larger application (or library) in a workspace which consists of multiple "modules" (i.e., crates for cargo, packages for npm, etc.)

I want to propose explicitly considering this use case as in scope for Spin as well, and to identify changes needed to support it better.

The key motivation is that it's often useful to componentize an application without necessarily treating individual components as self-contained projects, ready for publishing to a registry on their own. In the context of the component model, typical motivations for this include wanting to use different languages for implementing different parts of an application, or reducing accessible capabilities for security-sensitive code.

I'd like to gather input on the overall goal here as a first step. Afterwards, we can start identifying changes derived from considering this goal as in scope for Spin, if that's the conclusion we arrive at.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.