new-capnp-generator
v1.0.13
Published
This project automatically generates Cap'n'Proto files from JavaScript/Wasm files stored in any S3 bucket.
Downloads
18
Readme
capnp-generator
This project automatically generates Cap'n'Proto files from JavaScript/Wasm files stored in any S3 bucket.
Overview
Installation
To install the project, run yarn
or npm i
Configuration
To configure the project, follow these steps:
- Install the AWS Command Line Interface (CLI) by running
pip install awscli
. - Run
aws configure
and provide your public access key and private key.
Note: This project has been implemented using Scaleway Object Storage S3. If you want to use a similar setup, please refer to this tutorial.
Usage
Production mode
To run the project in production mode, use the command yarn start
or npm start
Development Mode
To run the project in development mode, use the command yarn run dev
or npm run dev
Example Usage
If you are using The Fake Cloudflare API, you can push your code to an S3 bucket. The S3 bucket will then call the capnp-generator to generate the required configuration file for the Workerd Runtime, and save the configuration in the S3 bucket.
flowchart TB
client --> wrangler --> |https| fake-cloudflare-api
subgraph Cloud
S3
subgraph Kubernetes
capnp-generator
fake-cloudflare-api
end
fake-cloudflare-api --> |push codes| S3
capnp-generator --> |push capnp| S3
S3 --> |get file list| capnp-generator
end