Skip to content

Automattic/wordpress-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wordpress-rs

This project is under heavy development and shouldn't be considered production-ready yet. We're happy to hear any feedback you might have, but we're not yet ready to accept significant code contributions from others. We look forward to engaging with the community on this project in early 2025.

A cross-platform implementation of the WordPress REST API written in Rust, with bindings for Kotlin, Swift, and more.

Prerequisites

The Rust toolchain is required to build this project.

Given the multi-platform nature of this project, the development environment will vary depending on the platform you are targeting. Below are dependencies for each platform, grouped by language.

Kotlin

Dependency Platform
Gradle Core
Android SDK Android
Docker (for integration tests) Core + Android

Swift

Dependency Platform
Swift toolchain Core
Xcode Apple Platforms
Docker (for integration tests and server-side Swift) Core + Server
  • Core: Required for all platforms.
  • Android: Required for Android development.
  • Apple Platforms: Required for iOS, macOS, watchOS, and tvOS development.
  • Server: Required for server-side development.

Development

Many of the project scripts are managed in a Makefile found in the root of the project. To see a list of available commands, run:

make help

Testing

This project has several test suites. Integration tests require Docker, and you must run make test-server prior to the test invocation.

Test Suite Run on local machine. Run in Docker
Rust Unit Tests cargo test --lib make test-rust-lib
Rust Documentation Tests cargo test --doc make test-rust-doc
Rust Integration Tests cargo test -p wp_api_integration_tests make test-rust-integration
Kotlin Integration Tests cd native/kotlin && ./gradlew :api:kotlin:integrationTest make test-kotlin-integration
Swift Unit Tests swift test make test-swift-linux-in-docker