From e4a868078ab43772e36cd8ffc59fd995353fb402 Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Mon, 25 Sep 2023 13:19:31 +0100 Subject: examples: Add C and Rust examples of handling large uploads The programs demonstrate handling requests with payloads larger than 4GiB which means they need to be written out to disk and so also demonstrates the use of the file-system access mechanism. Signed-off-by: Andrew Clayton --- examples/c/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'examples/c/Makefile') diff --git a/examples/c/Makefile b/examples/c/Makefile index 1b10269..0b0fc31 100644 --- a/examples/c/Makefile +++ b/examples/c/Makefile @@ -12,7 +12,9 @@ luw_deps = $(LUW_SRCDIR)/libunit-wasm.a \ examples: examples-luw -examples-luw: luw-echo-request.wasm luw-upload-reflector.wasm +examples-luw: luw-echo-request.wasm \ + luw-upload-reflector.wasm \ + large-upload.wasm examples-raw: echo-request-raw.wasm upload-reflector-raw.wasm @@ -36,5 +38,9 @@ upload-reflector-raw.wasm: upload-reflector-raw.c unit-wasm-raw.o $(PP_CCLNK) $(SDIR)/$@ $(v)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< unit-wasm-raw.o +large-upload.wasm: large-upload.c $(luw_deps) + $(PP_CCLNK) $(SDIR)/$@ + $(v)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) + clean: rm -f *.wasm *.o *.gch -- cgit