Usecase: `michelle.wasm` is a component that has some `import` named `foo`. Michelle wants to use a python-library compiled as a component (py.wasm) to satisfy the `fermyon:spin/kv`. ``` package fermyon:spin interface getter { get: func(key: string) -> list<u8> } world kv { export getter } ``` ``` package fermyon:michelle world michelle { export wasi:http/incoming-http import fermyon:spin/kv import foo: func() -> string } ``` ``` package fermyon:brian world brian { export bar: func() -> string } ``` ```toml [component.brian] source = "brian.wasm" [component.michelle] source = "michelle.wasm" [component.michelle.imports] "fermyon:spin/kv" = { source = "simple-kv.wasm", export = "x" } "foo" = { component_id = "brian", export = "bar" } ``` Every component manifest is relative to `spin.toml`. ```toml # spin.toml ... metadata ... [[component]] include = "path/to/component.toml" ``` ``` [[component]] id = ``` appdir/ component1/ spin.toml (sans application metadata) subproject/ spin.toml (with application metadata) % spin deploy (in appdir) `spin-project` ```toml ... application metadata ... [project] component1 = "path/to/component1" ... componentN = "path/to/componentN" ``` % spin-project build => spin.toml path/to/component* ```toml id = "fileserver" source = "components/fileserver.wasm" files = [{ source = "site/dist", destination = "/" }] [trigger] route = "/..." [build] workdir = "site" command = "make" ``` - Do you think there should be another manifest, something like component.toml that only has component information and then you’d include the path to that in your top level spin.toml file or do you think there should be another spin.toml in the component subdirectories? - Are you thinking something like a new component section key in the `spin.toml` that allows you to modularize components out into their own manifests, for example: In `spin.toml`: ```toml spin_manifest_version = "1" name = "my-app" version = "0.1.0" trigger = { type = "http", base = "/" } [[component]] include = "path/to/component.toml" ``` Where `path/to/component.toml` looks like: ```toml id = "my-component" source = "path/to/wasm" [trigger] route = "/..." ... other component specific sections ... ```