From 6f70b1fe44582f195654bb41c41d43f2eb78a975 Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Thu, 24 Aug 2023 21:05:06 +0100 Subject: README.md: Update the README and config example This takes into account the recent porting of the Rust demo applications to the new 'rusty' wrappers. The updates relate to the function handler names, the ones provided by the application now use the uwr_ prefix, the malloc and free handlers are still using the luw_ prefix as the applications aren't providing their own versions of those, the ones from libunit-wasm will be used. This is a useful demonstration of a number of things, but ultimately that you can call these handlers anything you want. Signed-off-by: Andrew Clayton --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index fd5af73..805c54c 100644 --- a/README.md +++ b/README.md @@ -88,11 +88,11 @@ You can now use this in Unit with the following config "my-wasm-example": { "type": "wasm", "module": "/path/to/my-wasm-example/target/wasm32-wasi/debug/my_wasm_example.wasm", - "request_handler": "luw_request_handler", + "request_handler": "uwr_request_handler", "malloc_handler": "luw_malloc_handler", "free_handler": "luw_free_handler", - "module_init_handler": "luw_module_init_handler", - "module_end_handler": "luw_module_end_handler" + "module_init_handler": "uwr_module_init_handler", + "module_end_handler": "uwr_module_end_handler" } } } @@ -304,20 +304,20 @@ Create the following Unit config "rust-echo-request": { "type": "wasm", "module": "/path/to/unit-wasm/examples/rust/echo-request/target/wasm32-wasi/debug/rust_echo_request.wasm", - "request_handler": "luw_request_handler", + "request_handler": "uwr_request_handler", "malloc_handler": "luw_malloc_handler", "free_handler": "luw_free_handler", - "module_init_handler": "luw_module_init_handler", - "module_end_handler": "luw_module_end_handler" + "module_init_handler": "uwr_module_init_handler", + "module_end_handler": "uwr_module_end_handler" }, "rust-upload-reflector": { "type": "wasm", "module": "/path/to/unit-wasm/examples/rust/upload-reflector/rust_upload_reflector.wasm", - "request_handler": "luw_request_handler", + "request_handler": "uwr_request_handler", "malloc_handler": "luw_malloc_handler", "free_handler": "luw_free_handler", - "request_end_handler": "luw_request_end_handler", - "response_end_handler": "luw_response_end_handler" + "request_end_handler": "uwr_request_end_handler", + "response_end_handler": "uwr_response_end_handler" } } } -- cgit