# Installation

> Install Laravel Anydoc Rust with Cargo and register its service provider.

Add the crate and register its service provider. The package needs no configuration to convert documents.

## Requirements

Laravel Anydoc Rust requires Laravel Rust 0.1 and Rust 1.99 or later.

## Install the crate

Add the crate with Cargo:

```bash
cargo add laravel-anydoc
```

Then register its service provider in `src/app.rs`:

```rust
use laravel::Application;
use laravel::foundation::ApplicationBuilder;

pub fn configure() -> ApplicationBuilder {
    Application::configure().with_providers(|providers| {
        providers.add(laravel_anydoc::AnydocServiceProvider);
    })
}
```

The provider registers `Anydoc` as a singleton, which handlers receive with `Inject<Anydoc>`.

## Versioning

Releases stay at 0.x while Laravel Rust is in beta. Until the framework reaches 1.0, its minor releases may break its API and its patch releases never do, so each Laravel Rust minor gets a new minor of this package.

## Next steps

[Convert your first document](https://hosmelq.com/docs/laravel-anydoc-rust/v0.1/basic-usage/converting-documents/), and see [Configuration](https://hosmelq.com/docs/laravel-anydoc-rust/v0.1/configuration/) for the environment variables that set up OCR and the size limit.
