For AI agents: the complete documentation index is available at https://a3s-lab.github.io/Boot/v0.1.4/en/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/Boot/v0.1.4/en/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/Boot/v0.1.4/en/getting-started/installation.md.
  • English
  • v0.1.4
  • Installation and features

    A3S Boot uses Cargo features to control protocol adapters and technique modules. Start an HTTP application with the defaults, then enable additional capabilities only at real business boundaries.

    Default installation

    [dependencies]
    a3s-boot = "0.1.4"
    tokio = { version = "1", features = ["macros", "rt-multi-thread"] }

    The default features are:

    FeatureContents
    axumAxum HTTP and WebSocket adapter
    macrosModule, provider, controller, route, and protocol attributes
    shutdown-hooksSIGINT and SIGTERM shutdown handling

    The final application selects Tokio runtime features. The configuration above is appropriate for a multithreaded service with #[tokio::main].

    Minimal core

    Disable defaults when you do not need the HTTP adapter, macros, or signal handling:

    [dependencies]
    a3s-boot = { version = "0.1.4", default-features = false }

    This combination fits libraries that only use explicit builders, integrations whose host owns the runtime, or applications that only need the protocol-neutral core.

    Enable capabilities explicitly

    [dependencies]
    a3s-boot = {
      version = "0.1.4",
      features = ["auth", "security", "session", "openapi-schemas"]
    }
    serde = { version = "1", features = ["derive"] }
    tokio = { version = "1", features = ["macros", "rt-multi-thread"] }

    Application and HTTP

    FeatureCapability
    configParse and validate typed configuration through a3s-acl
    authStrategy-backed authentication service and guard
    securityCORS, CSRF, rate limiting, and security response headers
    sessionSession middleware, cookies, and replaceable stores
    cacheCache interface, in-memory store, and response cache interceptor
    databaseReplaceable database facade and in-memory test backend
    http-clientProvider-managed outbound HTTP client
    compressiongzip response compression
    file-uploadBounded multipart uploads
    staticStatic files and SPA fallback
    request-contextTask-local access to the current request context
    openapi-schemasCollect component schemas from schemars::JsonSchema

    Background capabilities

    FeatureCapability
    cqrsCommand, query, and event buses
    eventsA3S Event providers and listeners
    queueA3S Lane-backed in-process queues
    queue-postgresA3S ORM-backed shared PostgreSQL queues, also enables queue
    scheduleTimeout, interval, and cron scheduling
    loggingStructured logger and request logging enhancers
    healthHealth checks and indicators
    ilinkTencent Weixin iLink login, polling, reply, and lifecycle boundary

    Message transports

    tcp-transport, redis-transport, nats-transport, mqtt-transport, rabbitmq-transport, kafka-transport, and grpc-transport enable their corresponding network implementations. InProcessTransport needs no additional feature.

    Enabling a transport adds its client and adapter implementation. It does not create or manage an external broker.

    PostgreSQL queue version difference

    [dependencies]
    a3s-boot = { version = "0.1.4", features = ["queue-postgres"] }
    serde_json = "1"
    tokio = { version = "1", features = ["macros", "rt-multi-thread"] }

    The queue-postgres feature in Boot v0.1.4 uses A3S ORM 0.2.0. The public queue contract is the same as v0.2.0, while the internal claim implementation uses the ORM capabilities available in that release.

    Do not manually override Boot's optional A3S ORM dependency. Cargo features are unified across the dependency graph, so inspect the final result with cargo tree -e features before deployment.

    Verify the selection

    cargo check
    cargo tree -e features -p a3s-boot
    cargo test

    Use cargo check --all-features when you need to evaluate all integrations together. End-to-end tests for network transports and PostgreSQL can require their corresponding external services.

    Continue to the quick start and run the first route.