Welcome to the XDK project! This repository contains a collection of Rust crates designed for generating and managing SDKs (or XDKs) for the X APIs. The project focuses on creating high-quality, type-safe SDKs for various programming languages, starting with Python, from OpenAPI specifications.
The project is organized into several crates within this workspace:
xdk-gen
: A code generation library that transforms OpenAPI specifications into language-specific SDKs.xdk-build
: A command-line tool for building and generating SDKs from OpenAPI specifications. Provides a user-friendly interface for the code generation process.xdk-openapi
: A minimal OpenAPI 3.0.0 specification parser. (Seexdk-openapi/README.md
for details)assets
: Contains shared assets, examples, or configuration files used by the project.
- Rust toolchain (install via rustup)
To build all crates in the workspace, run the following command from the root directory:
cargo build
To build a specific crate, use the -p
flag:
cargo build -p xdk-openapi
To run tests for all crates:
cargo test
To run tests for a specific crate:
cargo test -p xdk-openapi
To generate a Python SDK from an OpenAPI specification:
cargo run -p xdk-build -- python --spec path/to/openapi.yaml --output path/to/output
This project is licensed under the MIT License. See the LICENSE
file (if available) or individual crate licenses for details.