Skip to content

Spin dev componentsΒ #1229

@radu-matei

Description

@radu-matei

In Spin, all components in spin.toml will make their way into a deployed application.

There are scenarios where it might be desirable to be able to execute a component locally, while in development, but definitely not in production.

An example of this is https://github.com/radu-matei/spin-kv-explorer, which can introspect the entire contents of the KV store.

I would like to investigate what a [dev_component] section could look like, that can be executed locally, but would not make its way to a production scenario by default.

For example:

[[dev_component]]
source = { url = "https://github.com/radu-matei/spin-kv-explorer/releases/download/<latest-release>/spin-kv-explorer.wasm", digest = "sha256:aaa" }
id = "kv-explorer"
# add or remove stores you want to explore here
key_value_stores = ["default"]
[component.trigger]
route = "/internal/kv-explorer/..."

Whether or not the default behavior would include or exclude dev components, first I'd like to understand if this is a feature others would find useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions