#cors #logging #settings #wasmcloud #http-server #header #actor #filename #log #filenames

bin+lib wasmcloud-provider-httpserver

Http server for wasmcloud, using warp. This package provides a library, and a capability provider with the 'wasmcloud:httpserver' contract.

1 unstable release

0.17.1 Mar 27, 2023

#1172 in Asynchronous

Apache-2.0 and LGPL-3.0-or-later

50KB
1K SLoC

wasmCloud HTTP Server Provider

This capability provider implements the wasmcloud:httpserver capability contract, and enables an actor to accept incoming HTTP(s) requests. It is implemented in Rust with the warp web server framework and the fast and scalable hyper http implementation.

For more information on the operations supported by this provider, please check out its corresponding interface.

Run make to compile to a native executable and build the par file. The par file is created in build/httpserver.par.gz.

Configuration settings for the httpserver provider are described in settings.

The default listen address is 127.0.0.1 port 8000.

⚠️ Caution - Port Ownership

If the instance of this capability provider running on a single host is linked to multiple actors attempting to claim the same port, only the first link definition for that port will succeed, and the subsequent attempts will fail. During development, it is recommended to check ("tail") the wasmCloud host logs for success and error messages.

For more hands-on tutorials on building actors, including HTTP server actors, see the wasmcloud.dev website.

Dependencies

~29–49MB
~868K SLoC