Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/automattic/wordpress-rs
A cross-platform WordPress API implementation
https://github.com/automattic/wordpress-rs
kotlin rust swift wordpress
Last synced: about 1 month ago
JSON representation
A cross-platform WordPress API implementation
- Host: GitHub
- URL: https://github.com/automattic/wordpress-rs
- Owner: Automattic
- License: mpl-2.0
- Created: 2023-10-17T20:56:29.000Z (about 1 year ago)
- Default Branch: trunk
- Last Pushed: 2024-10-07T08:22:04.000Z (about 1 month ago)
- Last Synced: 2024-10-07T11:16:20.580Z (about 1 month ago)
- Topics: kotlin, rust, swift, wordpress
- Language: Rust
- Homepage:
- Size: 5.68 MB
- Stars: 8
- Watchers: 5
- Forks: 0
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://developer.wordpress.org/rest-api/) written in Rust, with bindings for Kotlin, Swift, and more.
## Prerequisites
The [Rust toolchain](https://www.rust-lang.org/tools/install) 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](https://gradle.org/install/) | Core |
| [Android SDK](https://developer.android.com/tools) | Android |
| [Docker](https://www.docker.com/) (for integration tests) | Core + Android |### Swift
| Dependency | Platform |
| -------------------------------------------------------------------------------- | --------------- |
| [Swift toolchain](https://www.swift.org/install/macos/) | Core |
| [Xcode](https://developer.apple.com/xcode/) | Apple Platforms |
| [Docker](https://www.docker.com/) (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:
```sh
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` |