Compare commits
2 Commits
70b0fda03b
...
e6ac41f4df
Author | SHA1 | Date | |
---|---|---|---|
e6ac41f4df | |||
ee5dd01e73 |
19
README.md
19
README.md
|
@ -8,7 +8,7 @@ into a function that can be run as:
|
||||||
* A standalone web server
|
* A standalone web server
|
||||||
* An AWS Lambda function
|
* An AWS Lambda function
|
||||||
* A shared library in [flexilib](https://git.lerch.org/lobo/FlexiLib)
|
* A shared library in [flexilib](https://git.lerch.org/lobo/FlexiLib)
|
||||||
* Cloudflare (TODO/Planned)
|
* Cloudflare
|
||||||
* etc
|
* etc
|
||||||
|
|
||||||
Usage - Development
|
Usage - Development
|
||||||
|
@ -28,8 +28,8 @@ Create a `build.zig.zon` with the following contents:
|
||||||
|
|
||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
.universal_lambda_build = .{
|
.universal_lambda_build = .{
|
||||||
.url = "https://git.lerch.org/lobo/universal-lambda-zig/archive/ea730c50a50faddf4af719bbb3d8d5fac09e0c19.tar.gz",
|
.url = "https://git.lerch.org/lobo/universal-lambda-zig/archive/70b0fda03b9c54a6eda8d61cb8ab8b9d9f29b2ef.tar.gz",
|
||||||
.hash = "1220be3a235a6506dbfef0ba6705e728eebabf9af2b33364aead1c30cdcde353f357",
|
.hash = "122004f2a4ad253be9b8d7989ca6508af1483d8a593ca7fee93627444b2b37d170d2",
|
||||||
},
|
},
|
||||||
.flexilib = .{
|
.flexilib = .{
|
||||||
.url = "https://git.lerch.org/lobo/flexilib/archive/c44ad2ba84df735421bef23a2ad612968fb50f06.tar.gz",
|
.url = "https://git.lerch.org/lobo/flexilib/archive/c44ad2ba84df735421bef23a2ad612968fb50f06.tar.gz",
|
||||||
|
@ -110,13 +110,22 @@ Linux:
|
||||||
awslambda_deploy Deploy the function
|
awslambda_deploy Deploy the function
|
||||||
awslambda_iam Create/Get IAM role for function
|
awslambda_iam Create/Get IAM role for function
|
||||||
awslambda_run Run the app in AWS lambda
|
awslambda_run Run the app in AWS lambda
|
||||||
standalone_server Run the function in its own web server
|
cloudflare Deploy as Cloudflare worker (must be compiled with -Dtarget=wasm32-wasi)
|
||||||
flexilib Create a flexilib dynamic library
|
flexilib Create a flexilib dynamic library
|
||||||
|
standalone_server Run the function in its own web server
|
||||||
```
|
```
|
||||||
|
|
||||||
AWS Lambda is not currently available if building with other operating systems,
|
AWS Lambda is not currently available if building with other operating systems,
|
||||||
as that set of build steps utilize system commands using the AWS CLI. This is
|
as that set of build steps utilize system commands using the AWS CLI. This is
|
||||||
likely to change in the future to enable other operating systems.
|
likely to change in the future to enable other operating systems. All other
|
||||||
|
build steps are available for all targets.
|
||||||
|
|
||||||
|
Note that AWS Lambda will require that credentials are established using the
|
||||||
|
same methods as checked by the AWS CLI and the AWS CLI is installed.
|
||||||
|
|
||||||
|
If using Cloudflare deployment, either CLOUDFLARE_API_TOKEN or
|
||||||
|
CLOUDFLARE_EMAIL/CLOUDFLARE_API_KEY environment variables must be set for
|
||||||
|
successful deployment.
|
||||||
|
|
||||||
To run as an executable, a simple `zig build` will build, or `zig build run`
|
To run as an executable, a simple `zig build` will build, or `zig build run`
|
||||||
will run as expected. `zig build standalone_server run` will also build/run
|
will run as expected. `zig build standalone_server run` will also build/run
|
||||||
|
|
|
@ -64,9 +64,9 @@ pub fn configureBuild(b: *std.Build, cs: *std.Build.Step.Compile) !void {
|
||||||
|
|
||||||
// Add steps
|
// Add steps
|
||||||
try @import("lambda_build.zig").configureBuild(b, cs, function_name);
|
try @import("lambda_build.zig").configureBuild(b, cs, function_name);
|
||||||
try @import("standalone_server_build.zig").configureBuild(b, cs);
|
|
||||||
try @import("flexilib_build.zig").configureBuild(b, cs, file_location);
|
|
||||||
try @import("cloudflare_build.zig").configureBuild(b, cs, function_name);
|
try @import("cloudflare_build.zig").configureBuild(b, cs, function_name);
|
||||||
|
try @import("flexilib_build.zig").configureBuild(b, cs, file_location);
|
||||||
|
try @import("standalone_server_build.zig").configureBuild(b, cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This function relies on internal implementation of the build runner
|
/// This function relies on internal implementation of the build runner
|
||||||
|
|
Loading…
Reference in New Issue
Block a user