Crates.io | kinetics |
lib.rs | kinetics |
version | 0.7.16 |
created_at | 2025-03-20 14:24:26.679742+00 |
updated_at | 2025-09-18 09:48:43.492792+00 |
description | Kinetics is a hosting platform for Rust applications that allows you to deploy all types of workloads by writing **only Rust code**. |
homepage | |
repository | https://github.com/ottofeller/kinetics |
max_upload_size | |
id | 1599246 |
size | 259,365 |
Kinetics is a hosting platform for Rust applications that allows deploying all types of workloads by writing only Rust code.
#[endpoint(
url_path = "/path",
environment = {"SOME_VAR": "SomeVal"},
)]
pub async fn endpoint(
_event: Request<()>,
_secrets: &HashMap<String, String>,
) -> Result<Response<Body>, BoxError> {
let resp = Response::builder()
.status(200)
.header("content-type", "text/html")
.body("Hello!".into())?;
Ok(resp)
}
Check out more examples here. Including REST API endpoints, queue workers, and cron jobs.
🦀 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.
# 1. Install
cargo install kinetics
# 2. Login or sign up
kinetics login <email>
# 3. Init a project from template
kinetics init test; cd test
# 4. View the name of the function to call locally
kinetics list
# 5. Call the function locally
kinetics invoke LibEndpoint
# 6. Edit the project name to be unique across all projects
# deployed to kinetics
vim Cargo.toml
# 7. Deploy the entire project to the cloud
kinetics deploy
# 8. Alternatively you can deploy only selected functions
kinetics deploy --functions BasicCronCron,BasicWorkerWorker
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.
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).
The following attribute macro parameters are available:
url_path
: The URL path of the endpoint.environment
: Environment variables.concurrency
: Max number of concurrent workers.fifo
: Set to true to enable FIFO processing.environment
: Environment variables.schedule
: Schedule expression.environment
: Environment variables.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 is defined in Cargo.toml
:
[package.metadata.kinetics.kvdb.test]
# 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
name = "test"
You can then interact with it like you normally interact with DynamoDB, example.
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 functionTry 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:
kinetics list
Invoke a function locally with parameters. --payload
sets the JSON body payload:
kinetics invoke DatabaseDatabase --payload '{"account": "111", "name": "Carlos"}' --table mytable
Deploy entire project:
kinetics deploy
Deploy individual functions:
kinetics deploy --functions DatabaseDatabase,BasicWorkerWorker
Invoke a function remotely by automatically resolving function's name into the URL:
kinetics invoke DatabaseDatabase --remote --payload '{"account": "111", "name": "Carlos"}'
Output logs for a function:
kinetics logs BasicEndpointEndpoint
Output run statistics for a function:
kinetics stats BasicEndpointEndpoint