Skip to content

Commit

Permalink
Update template to generate v2 manifests
Browse files Browse the repository at this point in the history
Signed-off-by: Brian H <[email protected]>
  • Loading branch information
fibonacci1729 committed Jun 26, 2024
1 parent 2cc2488 commit 9f42e56
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions templates/mqtt-rust/content/spin.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
spin_manifest_version = "1"
spin_manifest_version = 2

[application]
name = "{{project-name | kebab_case}}"
version = "0.1.0"
authors = ["{{authors}}"]
description = "{{project-description}}"
name = "{{project-name}}"
trigger = { type = "mqtt", address = "{{mqtt-address}}", username = "{{mqtt-username}}", password = "{{mqtt-password}}", keep_alive_interval = "{{mqtt-keep_alive_interval}}" }
version = "0.1.0"

[[component]]
id = "{{project-name | kebab_case}}"
source = "target/wasm32-wasi/release/{{project-name | snake_case}}.wasm"
allowed_outbound_hosts = ["{{mqtt-address}}"]
[component.trigger]
[application.trigger.mqtt]
address = "{{mqtt-address}}"
username = "{{mqtt-username}}"
password = "{{mqtt-password}}"
keep_alive_interval = "{{mqtt-keep_alive_interval}}"

[[trigger.mqtt]]
component = "{{project-name | kebab_case}}"
topic = "{{mqtt-topic}}"
qos = "{{mqtt-qos}}"
[component.build]
command = "cargo build --target wasm32-wasi --release"

[component.{{project-name | kebab_case}}]
source = "target/wasm32-wasi/release/{{project-name | snake_case}}.wasm"
allowed_outbound_hosts = ["{{mqtt-address}}"]
[component.{{project-name | kebab_case}}.build]
command = "cargo build --target wasm32-wasi --release"

0 comments on commit 9f42e56

Please sign in to comment.