Skip to content

Commit 6d19ea0

Browse files
committed
Update grain template for componentization
Signed-off-by: Lann Martin <[email protected]>
1 parent 09de9c3 commit 6d19ea0

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

templates/http-grain/content/main.gr

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
print("content-type: text/plain")
2-
print("")
3-
print("Hello, World")
1+
module Main
2+
3+
provide let _start = () => {
4+
print("content-type: text/plain")
5+
print("")
6+
print("Hello, World")
7+
}

templates/http-grain/content/spin.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ executor = { type = "wagi" }
1515
source = "main.wasm"
1616
allowed_outbound_hosts = []
1717
[component.{{project-name | kebab_case}}.build]
18-
command = "grain compile --release -o main.wasm main.gr"
18+
command = "grain compile --release --use-start-section -o main.wasm main.gr"
1919
watch = ["**/*.gr"]

tests/integration.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,6 @@ Caused by:
628628
#[test]
629629
#[cfg(target_arch = "x86_64")]
630630
#[cfg(feature = "extern-dependencies-tests")]
631-
#[ignore = "https://github.com/fermyon/spin/issues/2774"]
632631
fn http_grain_template_smoke_test() -> anyhow::Result<()> {
633632
http_smoke_test_template(
634633
"http-grain",

0 commit comments

Comments
 (0)