Kinetics
Kinetics is a hosting platform for Rust applications that allows deploying all types of workloads by writing only Rust code.
pub async
Check out more examples here. Including REST API endpoints, queue workers, and cron jobs.
Features
🦀 Only Rust code
Just apply attribute macro to your function, and Kinetics will handle the rest. No other tools required.
🚀 Any workload
Deploy REST API endpoints, queue workers, and cron jobs.
🏕️ Works offline
Test your functions locally with no connection to the internet. We mock DB as well, so all requests to DB also work locally. No configuration required.
💿 Comes with DB
Seamlessly provision KV DB if your workload needs a persistent storage.
🔑 Secrets
Automatically provision secrets from .env.secrets file.
📚 Logs Monitor your functions with just CLI.
🤖 No infrastructure management
The infrastructure is provisioned automatically, e.g. a queue for the worker workload.
Getting started
# 1. Install
# 2. Login or sign up
# 3. Init a project from template
;
# 4. View the name of the function to call locally
# 5. Call the function locally
# 6. Edit the project name to be unique across all projects
# deployed to kinetics
# 7. Deploy the entire project to the cloud
# 8. Alternatively you can deploy only selected functions
Kinetics is currently in ⚠️ active development and may contain bugs or result in unexpected behavior. The service is free for the first 100,000 invocations of your functions, regardless of the type of workload.
If you have any issues, please contact us at support@usekinetics.com.
Documentation
All configuration can be done through attribute macro parameters, or through modifications to Cargo.toml file in your project. All types of workloads support environment variables. These can be changed without redeploying (this feature is WIP).
Endpoint
The following attribute macro parameters are available:
url_path: The URL path of the endpoint.environment: Environment variables.
Worker
concurrency: Max number of concurrent workers.fifo: Set to true to enable FIFO processing.environment: Environment variables.queue_alias: The alias of the queue to be created for the worker. Will be added inqueueshash map.
Cron
schedule: Schedule expression.environment: Environment variables.
Secrets
Store secrets in .env.secrets file in the root directory of your crate. Kinetics will automatically pick it up and provision to all of your workloads in the second parameter of the function as HashMap<String, String>.
Database
Database is defined in Cargo.toml:
[]
# You will need this name to connect to the database
# If not defined then the resource name from above will be used as DB name
= "test"
You can then interact with it like you normally interact with DynamoDB, example.
Commands
kinetics init- Init new project from templatekinetics login- Log in with emailkinetics invoke- Invoke function locallykinetics deploy- Deploy your applicationkinetics destroy- Destroy applicationkinetics list– List available resourceskinetics logout– Log out the current userkinetics logs- View application logskinetics stats- View run statistics for a function
Examples
Try in examples/ dir. These are the most frequently used commands with examples of input params.
List out functions before deployment. Their names and URLs of REST API endpoints:
Invoke a function locally with parameters. --payload sets the JSON body payload:
Deploy entire project:
Deploy individual functions:
Invoke a function remotely by automatically resolving function's name into the URL:
Output logs for a function:
Output run statistics for a function:
Support & Community
- support@usekinetics.com. Help with builds, deployments, and runtime.
- GitHub Issues. Persistent bugs, and feature requests.