---
schema_version: "1"
id: b41b9970ac010385b1eefc0d5f5586d866f8a7c0386028b4e22ed7cc11cc8b79
title: Upgrading PDK
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/pdk/1.3/policies-pdk-upgrade-pdk.md
canonical_url: https://docs.mulesoft.com/pdk/1.3/policies-pdk-upgrade-pdk
source_site: docs.mulesoft.com
content_type: documentation
content_hash: dd4796c53b44eafd27f114c9560f4c4bd20fa69be551545b6e1e5bf4280d9219
description: MuleSoft Documentation Site
release: "1.3"
latest: false
---
---
product: Omni Gateway Policy Development Kit (PDK)
version: 1.3
---

# Upgrading PDK

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

To update a custom policy project, you must update each of these separately versioned Flex Gateway
Policy Development Kit (PDK) components:

- Anypoint CLI PDK plugin

- PDK Rust libraries

- Anypoint Cargo plugin

When you upgrade your Anypoint CLI PDK plugin, you must manually upgrade the PDK Rust libraries and
Anypoint Cargo plugin to be compatible with the new plugin version. All the PDK custom policies on
your device use the same Anypoint CLI PDK plugin. When you create a new custom policy project, the
PDK Rust libraries and Anypoint Cargo plugin versions are the same as the Anypoint CLI PDK plugin
used to create the project and are independent from other policy projects.

To upgrade a custom policy project created with an earlier version of the Anypoint CLI PDK plugin:

1.  [Upgrade the Anypoint CLI PDK Plugin](#anypoint-cli-pdk-plugin)

2.  [Upgrade the PDK Rust Libraries](#pdk-rust-libraries)

3.  [Upgrade the Anypoint Cargo Plugin](#anypoint-cargo-plugin)

## Upgrade the Anypoint CLI PDK Plugin

When editing a custom policy created with an earlier plugin version, ensure your
[PDK Rust libraries](#pdk-rust-libraries) and [Anypoint Cargo plugin](#anypoint-cargo-plugin) match
your Anypoint CLI PDK plugin version.

To upgrade your Anypoint CLI PDK plugin to the latest version, execute the following command:

```ssh
anypoint-cli-v4 plugins:install anypoint-cli-pdk-plugin
```

To verify your current plugin version, execute the following command:

```ssh
anypoint-cli-v4 plugins
```

For example, the following PDK plugin version is `1.1.0`:

```ssh
anypoint-cli-pdk-plugin 1.1.0
├─ anypoint-cli-command 1.5.2
│  └─ @oclif/plugin-help 5.1.12
└─ @oclif/plugin-version 1.0.4
```

## Upgrade the PDK Rust Libraries

The PDK Rust library is the Rust code library used by a specific custom policy. Different custom
policies might use different PDK library versions.

To upgrade the PDK Rust code libraries, modify the `pdk` `dependency` and `pdk-test`
`dev-dependency` versions in the `cargo.toml` file of the custom policy. The `pdk` and `pdk-test`
versions must match and your Anypoint CLI PDK plugin must support the specified version.

In the following example, both dependency versions are `1.0.0`. Modify it to your required version:

```toml
[dependencies]
pdk = { version = "1.0.0", registry = "anypoint" }

[dev-dependencies]
pdk-test = { version = "1.0.0", registry = "anypoint" }
```

## Upgrade the Anypoint Cargo Plugin

The Anypoint Cargo plugin extends the functionality of Cargo for use with the PDK Rust Libraries.

To upgrade your Anypoint Cargo plugin:

1.  Open the `Makefile` of your custom policy.

2.  Find the `install-cargo-anypoint` target, for example:

    install-cargo-anypoint: cargo install cargo-anypoint@1.0.0 --registry anypoint --config
    .cargo/config.toml

3.  Change the version after the `@` character to the required version.

4.  Save the `Makefile`.

5.  Execute the `make setup` command:

    ```ssh
    make setup
    ```

    > [!NOTE] Executing the `make setup` command for a certain policy installs that policy’s
    > Anypoint Cargo plugin version.

6.  Execute the following command to verify the correct version is installed:

    ```ssh
    cargo anypoint --version
    ```

## See Also

- [Prerequisites for Flex Gateway Policy Development Kit (PDK)](https://docs.mulesoft.com/pdk/1.3/policies-pdk-prerequisites)
