Skip to content

Releases: rapina-rs/rapina

v0.13.0

Choose a tag to compare

@github-actions github-actions released this 25 Jun 14:35
f404433

What's Changed

New Contributors

Full Changelog: v0.12.0...v0.13.0

v0.12.0

Choose a tag to compare

@github-actions github-actions released this 15 May 18:58
269cbb8

What's Changed

New Contributors

Full Changelog: v0.11.0...v0.12.0

v0.11.0

Choose a tag to compare

@github-actions github-actions released this 01 Apr 22:36
f4007f1

What's Changed

  • Fix documentation links in README by @tjweir in #308
  • Replace windows crate for smaller windows-sys by @juv in #307
  • Add new check into rapina doctor command by @chiucchi in #315
  • Add pluralized fn logic and tests by @ShiraiEd in #313
  • Use Option for nullable columns by @uemuradevexe in #317
  • Add static route map for O(1) parameterless route lookup by @arferreira in #316
  • Add radix trie for O(path_depth) dynamic route matching by @arferreira in #318
  • Create a good first issue template by @uemuradevexe in #309
  • Add a validation example by @uemuradevexe in #319
  • Add #[patch] proc-macro and Router::patch() shorthand by @uemuradevexe in #331
  • Update: Bump clap from 4.5.60 to 4.6.0 by @dependabot[bot] in #342
  • Update: Bump toml from 1.0.3+spec-1.1.0 to 1.0.6+spec-1.1.0 by @dependabot[bot] in #343
  • Update: Bump redis from 0.27.6 to 1.0.5 by @dependabot[bot] in #344
  • Add criterion benchmarks for router resolution by @arferreira in #320
  • Replace PathParams HashMap with SmallVec-backed struct by @arferreira in #321
  • Add put_named and delete_named methods by @uemuradevexe in #345
  • Support UUID primary keys in schema! macro by @Ismaellima4 in #314
  • Add feature flag for compression by @juv in #333
  • Use RFC7807 Problem Details for error responses by @Ismaellima4 in #347
  • Wrap State extractor in Arc to remove Clone bound by @lucaserm in #348
  • Replace string-based extractor classification with positional convention by @lucaserm in #349
  • Add unit tests for CORS middleware by @lucaserm in #350
  • Add --force flag to import database for re-importing by @lucaserm in #351
  • Document NaiveDateTime type and clarify DateTime timezone awareness in docs by @lucaserm in #354
  • Add unit tests for doctor diagnostic functions by @lucaserm in #355
  • Add middleware example demonstrating built-in and custom middleware by @lucaserm in #356
  • Document #[primary_key(...)] attribute in database docs by @lucaserm in #353
  • Handle irregular plurals and uncountable words in codegen singularize/pluralize by @lucaserm in #357
  • Add unit tests for test command pure functions by @lucaserm in #360
  • Add configurable verbosity and header redaction to RequestLogMiddleware by @arferreira in #361
  • add url-shortner example by @ShiraiEd in #364
  • Add seed database support by @yan-pi in #330
  • Adds inline comments in the undocumented structures in middleware/, s… by @ShiraiEd in #359
  • Add --bless snapshot testing for API responses by @lucaserm in #362
  • Enables multiple path parameters and updates the docs by @ShiraiEd in #358
  • Bump to 0.10.0, update changelog and roadmap by @arferreira in #370
  • Multipart file upload extractor by @Ismaellima4 in #363
  • auto-wire mod declarations in main.rs after import/add resource by @uemuradevexe in #365
  • feat: add built-in health check endpoints by @ShiraiEd in #366
  • Add deployment guide covering Docker, reverse proxies, and producton config by @lucaserm in #367
  • fix: use OpenAPI 3.0-compatible schema settings for serde_json::Value by @lucaserm in #374
  • Add background jobs table and migration by @arferreira in #372
  • Fix DTO codegen to use original crate types for JsonSchema compatibility by @lucaserm in #375
  • perf: tfb hot path by @lucaserm in #380
  • Update: Bump softprops/action-gh-release from 2.5.0 to 2.6.1 by @dependabot[bot] in #383
  • Update: Bump actions/cache from 4.3.0 to 5.0.4 by @dependabot[bot] in #384
  • Update: Bump github/codeql-action from 4.32.6 to 4.33.0 by @dependabot[bot] in #385
  • Update: Bump uuid from 1.19.0 to 1.22.0 by @dependabot[bot] in #386
  • Update: Bump futures-util from 0.3.31 to 0.3.32 by @dependabot[bot] in #387
  • Update: Bump matchit from 0.8.6 to 0.9.1 by @dependabot[bot] in #388
  • Update: Bump regex from 1.12.2 to 1.12.3 by @dependabot[bot] in #389
  • Update: Bump tracing-subscriber from 0.3.22 to 0.3.23 by @dependabot[bot] in #390
  • Update: Bump quote from 1.0.43 to 1.0.45 by @dependabot[bot] in #391
  • Update: Bump rustls-webpki from 0.103.9 to 0.103.10 by @dependabot[bot] in #397
  • feat: unify port env var to RAPINA_PORT and add .env scanning by @lucaserm in #373
  • Add #[job] macro for background job handlers by @arferreira in #382
  • Auto-generate OpenAPI requestBody from extractors by @sarpedondev in #396
  • Add rapina jobs list CLI command by @uemuradevexe in #394
  • add quickstart tutorial for getting started section by @uemuradevexe in #398
  • Fix set rust/schema type as option when nullable by @chiucchi in #407
  • fix: correct routes URL in dev banner by @XiaoPengMei in #411
  • Update: Bump actions/deploy-pages from 4.0.5 to 5.0.0 by @dependabot[bot] in #414
  • Update: Bump github/codeql-action from 4.33.0 to 4.34.1 by @dependabot[bot] in #415
  • Update: Bump clap from 4.5.54 to 4.6.0 by @dependabot[bot] in #416
  • Update: Bump redis from 1.0.5 to 1.1.0 by @dependabot[bot] in #417
  • Update: Bump uuid from 1.22.0 to 1.23.0 by @dependabot[bot] in #418
  • add a second tutorial for seaorm in blogs by @uemuradevexe in #409
  • Silence singularize dead code warnings by @Judel777 in #422
  • Add host and port verification by @ShiraiEd in #406
  • fix: update rapina version in docs by @Spartan09 in #429
  • Add Jobs extractor with enqueue and enqueue_with by @arferreira in #413
  • unit tests for routing system by @ShiraiEd in #428
  • Implement RetryPolicy with exponential backoff by @ShiraiEd in #426
  • add new worker.rs file, new jobs() app method, updates retry.rs mod.r… by @ShiraiEd in #431
  • Update extractors.md by @juv in #434
  • Bump version to 0.11.0 by @arferreira in #433

New Contributors

Full Changelog: v0.9.0...v0.11.0

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 16 Mar 17:33

What's Changed

  • Fix documentation links in README by @tjweir in #308
  • Replace windows crate for smaller windows-sys by @juv in #307
  • Add new check into rapina doctor command by @chiucchi in #315
  • Add pluralized fn logic and tests by @ShiraiEd in #313
  • Use Option for nullable columns by @uemuradevexe in #317
  • Add static route map for O(1) parameterless route lookup by @arferreira in #316
  • Add radix trie for O(path_depth) dynamic route matching by @arferreira in #318
  • Create a good first issue template by @uemuradevexe in #309
  • Add a validation example by @uemuradevexe in #319
  • Add #[patch] proc-macro and Router::patch() shorthand by @uemuradevexe in #331
  • Update: Bump clap from 4.5.60 to 4.6.0 by @dependabot[bot] in #342
  • Update: Bump toml from 1.0.3+spec-1.1.0 to 1.0.6+spec-1.1.0 by @dependabot[bot] in #343
  • Update: Bump redis from 0.27.6 to 1.0.5 by @dependabot[bot] in #344
  • Add criterion benchmarks for router resolution by @arferreira in #320
  • Replace PathParams HashMap with SmallVec-backed struct by @arferreira in #321
  • Add put_named and delete_named methods by @uemuradevexe in #345
  • Support UUID primary keys in schema! macro by @Ismaellima4 in #314
  • Add feature flag for compression by @juv in #333
  • Use RFC7807 Problem Details for error responses by @Ismaellima4 in #347
  • Wrap State extractor in Arc to remove Clone bound by @lucaserm in #348
  • Replace string-based extractor classification with positional convention by @lucaserm in #349
  • Add unit tests for CORS middleware by @lucaserm in #350
  • Add --force flag to import database for re-importing by @lucaserm in #351
  • Document NaiveDateTime type and clarify DateTime timezone awareness in docs by @lucaserm in #354
  • Add unit tests for doctor diagnostic functions by @lucaserm in #355
  • Add middleware example demonstrating built-in and custom middleware by @lucaserm in #356
  • Document #[primary_key(...)] attribute in database docs by @lucaserm in #353
  • Handle irregular plurals and uncountable words in codegen singularize/pluralize by @lucaserm in #357
  • Add unit tests for test command pure functions by @lucaserm in #360
  • Add configurable verbosity and header redaction to RequestLogMiddleware by @arferreira in #361
  • add url-shortner example by @ShiraiEd in #364
  • Add seed database support by @yan-pi in #330
  • Adds inline comments in the undocumented structures in middleware/, s… by @ShiraiEd in #359
  • Add --bless snapshot testing for API responses by @lucaserm in #362
  • Enables multiple path parameters and updates the docs by @ShiraiEd in #358
  • Bump to 0.10.0, update changelog and roadmap by @arferreira in #370

New Contributors

Full Changelog: v0.9.0...v0.10.0

v0.9.0

Choose a tag to compare

@github-actions github-actions released this 06 Mar 20:21
3b0d56f

What's Changed

Full Changelog: v0.8.0...v0.9.0

What's Changed

Full Changelog: v0.8.0...v0.9.0

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 01 Mar 16:46

What's Changed

Full Changelog: arferreira/rapina@v0.7.0...v0.8.0

v0.7.0

Choose a tag to compare

@arferreira arferreira released this 27 Feb 21:25

The big addition here is rapina import database — point the CLI at a live database and it reverse-engineers your schema into Rapina modules with handlers, DTOs, entities, and migrations. Also: graceful shutdown, structured logging with tracing, and CLI improvements across the board.

Database Import

rapina import database --url postgres://user:pass@host/db
rapina import database --url postgres://... --tables users,posts
rapina import database --url postgres://... --schema public

Connects to a live PostgreSQL, MySQL, or SQLite database, introspects the schema, and generates a full feature module per table: handlers (CRUD), DTOs with validation, typed error enums, schema! entity blocks, and migrations. Foreign keys become relationship fields. Supports table filtering and schema selection.

Feature-gated behind import-postgres, import-mysql, or import-sqlite to keep the base CLI dependency-free.

Graceful Shutdown

Rapina now handles SIGTERM/SIGINT properly — in-flight requests finish before the server exits. No more dropped connections on deploy.

Other Changes

  • println/eprintln replaced with tracing across the CLI (#231)
  • rapina doctor and rapina routes now accept --port and --host params (#248)
  • AI assistant config files (AGENT.md, .claude/, .cursor/) included in rapina new template (#230)
  • Catppuccin color palette extracted into shared module (#228)
  • Unit tests for OpenAPI and introspection endpoint handlers (#239)
  • Fixed Cargo.toml parser error on rapina dev and rapina test (#237)
  • Middleware documentation page (#204)
  • README.md added to project template (#193)

Upgrade

rapina = "0.7.0"
cargo install rapina-cli

Thanks to @ShiraiEd, @Ismaellima4, @uemuradevexe, @KelvinDiasMoreira, and @LevelUpExtreme for their contributions to this release.

What's Changed

New Contributors

Full Changelog: arferreira/rapina@v0.6.0...v0.7.0

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 22 Feb 15:19

The headline here is route auto discovery. Annotate your handlers, call .discover(), and Rapina finds everything at startup. No more manual route wiring in main.rs.

Route Auto Discovery

#[get("/users")]
async fn list_users() -> Json<Vec<User>> { ... }

#[post("/users")]
async fn create_user(input: Validated<Json<CreateUser>>) -> Json<User> { ... }

#[tokio::main]
async fn main() -> std::io::Result<()> {
    Rapina::new()
        .discover()
        .listen("127.0.0.1:3000")
        .await
}

Three lines in main. Routes are registered via inventory at startup — add a handler anywhere in your crate and it just works.

Other Changes

  • toml upgraded to 1.0 (TOML spec 1.1 support)
  • jsonwebtoken bumped to 10.3.0
  • Auto-labeler and welcome message for new contributors
  • Discord links consolidated across docs
  • Mobile header overflow fix on docs site
  • Prometheus metrics endpoint

Upgrade

rapina = "0.6.0"
cargo install rapina-cli

Thanks to @Jamersom-silva, @lucaserm, @uemuradevexe, and @sofia-araujo for their contributions.

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 18 Feb 17:06

The big addition here is rapina add resource — a single command that scaffolds an entire CRUD resource from the CLI.

Resource Scaffolding

rapina add resource user name:string email:string active:bool

This generates everything you need: handlers (list, get, create, update, delete), DTOs with JsonSchema, typed error handling, a schema! entity block, and a pre-filled database migration. Then it tells you exactly what to wire into main.rs.

Supports 12 field types with aliases (string, text, i32/integer, i64/bigint, f32/float, f64/double, bool/boolean, uuid, datetime, date, decimal, json). Conflict detection fails fast if the resource already exists.

The generated code matches the conventions from the todo-app example exactly — no surprises when you read what was scaffolded.

Database Migrations

New rapina migrate new command for standalone migrations:

rapina migrate new add_avatar_to_users

The add resource command generates pre-filled migrations automatically, but migrate new is there when you need migrations outside of resource creation (adding columns, indexes, etc.).

Other Changes

  • Improved documentation site UX
  • TraceIdMiddleware unit and integration tests
  • AppState doc comments
  • Fixed release workflow for manual releases

Upgrade

rapina = "0.5.0"

If you're using the CLI:

cargo install rapina-cli

Thanks to @yan-pi and @ShiraiEd for their contributions to this release.

v0.4.0

Choose a tag to compare

@arferreira arferreira released this 12 Feb 21:48

This release brings database support, better testing tools, and a bunch of middleware we've been missing.

Database Integration

The big one. You can now define your schema declaratively and get SeaORM entities generated:

rapina::schema! {
    User {
        #[unique]
        email: String,
        posts: Vec<Post>,
    }

    Post {
        title: String,
        content: Text,
        author: User,  // generates author_id foreign key
    }
}

Relationships are inferred from types. Vec<Post> is has_many, User is belongs_to. Optional relationships use Option<User>. Timestamps are automatic but can be disabled with #[timestamps(none)].

Database connection via the Db extractor:

#[get("/posts")]
async fn list_posts(db: Db) -> Result<Json<Vec<Post>>> {
    let posts = Post::find().all(db.conn()).await?;
    Ok(Json(posts))
}

Enable with features = ["postgres"] (or mysql, sqlite).

Testing

New rapina test command with coverage support:

rapina test              # run tests
rapina test --coverage   # with coverage report
rapina test --watch      # re-run on file changes

Middleware

  • Rate limiting - Token bucket algorithm, configurable per-route
  • Response compression - gzip/brotli support
  • CORS - Configurable origins, methods, headers
  • Cookie extractor - Typed cookie access in handlers

Other Changes

  • Fixed variable shadowing in route macros
  • Modular API grouping with Router::group()
  • Better error messages across the board

Upgrade

rapina = "0.4.0"

If you're using the CLI:

cargo install rapina-cli

Thanks to @juv, @ShiraiEd, and @uemuradevexe for their contributions to this release.