This document outlines the strategy for bringing SCP2P to all major operating systems and programming languages, ensuring broad adoption and ease of deployment for relays and client libraries.
SCP2P is built in Rust, providing a solid foundation for cross-platform support.
- Status: Currently implemented in
app/using Tauri v2 (Rust) + React (TypeScript). - Target: provide a user-friendly GUI for non-technical users on all major desktop platforms.
- Distribution:
- Windows:
.msi(Wix),.exe(NSIS), Winget. - macOS:
.dmg,.app, Homebrew Cask. - Linux:
.deb(Debian/Ubuntu),.rpm(Fedora/RHEL),.AppImage.
- Windows:
- Update Mechanism: Use Tauri's built-in updater for seamless background updates.
- Status: Supported via
crates/scp2p-cli. - Target: Power users, automated scripts, and headless environments.
- Distribution:
- Windows: Winget, Scoop.
- macOS: Homebrew (Formula).
- Linux: AUR (Arch), custom PPA (Ubuntu).
- Strategy: Use
UniFFIto generate high-level bindings. - Android: Kotlin/Java bindings distributed via Maven Central.
- iOS: Swift bindings distributed via Swift Package Manager (SPM) and CocoaPods.
To enable developers to use SCP2P in their preferred stack, we will provide idiomatic wrappers.
| Language | Technology | Package Manager | Status |
|---|---|---|---|
| Rust | Native | crates.io | In Progress |
| TypeScript/JS | napi-rs (Node) / wasm-bindgen (Web) |
npm | Planned |
| Python | uniffi-rs / PyO3 |
PyPI | Planned |
| Kotlin (Android) | uniffi-rs |
Maven Central | Planned |
| Swift (iOS/macOS) | uniffi-rs |
SPM | Planned |
| C# (.NET) | uniffi-rs |
NuGet | Planned |
| Go | cgo / C-FFI |
Go Modules | Planned |
| C/C++ | cbindgen |
System PMs | Planned |
- Async Bridging: Rust's
Tokioruntime must be managed within the wrapper. For UniFFI, this involves usinguniffi::exportand potentially a global runtime or per-object executor. - Memory Management: Ensure proper disposal of
NodeHandleacross the FFI boundary to prevent memory leaks in managed languages (Java/Python/JS). - Serialization: Use CBOR for internal state transfer where possible, or flatten structures into FFI-compatible types.
- Clean up
Cargo.tomlmetadata (description, repository, keywords). - Run
cargo publish -p scp2p-core.
- Use
napi-rsto generate Node.js addons. - Target
index.d.tsgeneration for TypeScript support. - Publish via
npm publish --access public.
- Use
maturinto build and publish. - Configure
pyproject.tomlto usematurinas the build backend. - Run
maturin publish.
- Generate AAR using UniFFI's Kotlin scaffolding.
- Use
nexus-staging-maven-pluginor similar for OSSRH publishing.
- Generate XCFramework using UniFFI.
- Host the binary on GitHub Releases and provide a
Package.swiftpointing to it.
- Use UniFFI's C# scaffolding.
- Build a
.nupkgcontaining the native DLL/so/dylib and the generated C# bindings. - Publish to
nuget.org.
A lightweight, headless relay implementation designed for servers.
- Stripped-down core: No search index, no content storage (unless caching is enabled).
- Focus on
RelayManagerandRelayTunnelRegistry. - Low memory/CPU footprint.
- Configuration via environment variables or minimal YAML.
- Docker: Official image on Docker Hub (
scp2p/relay). - Binary: Static binaries for Linux (x86_64, ARM64) built via
musl. - Package Managers:
- Homebrew:
brew install techartdev/tap/scp2p-relay - APT: Provide a
.debvia a PPA or custom repository. - Winget: Submit a manifest to the
microsoft/winget-pkgsrepository.
- Homebrew:
- Finalize
scp2p-coreAPI stability. - Ensure all public types are
FFI-safeor have conversion paths.
- Desktop: Finalize Tauri v2 build pipeline for all three OSs.
- Relay: Extract
scp2p-relayfromscp2p-core. - Distribution: Set up CI/CD for multi-arch binary releases and signed installers.
- Node.js: Priority 1 for web integrations and desktop apps (Electron/Capacitor).
- Python: Priority 2 for research and scripting.
- Mobile (Kotlin/Swift): Priority 3 for mobile client development.
- Automate publishing to
npm,PyPI,crates.io. - Submit to Homebrew, Winget, and Linux distros.
A dedicated crate for exposing the Rust core to other languages.
- Technology:
uniffifor high-level languages (Swift, Kotlin, Python) andcbindgenfor C/C++. - Scope: Wrap
NodeHandleand its associated types (ShareId,ContentId,SearchResult) into FFI-compatible structures. - Async Strategy: Implement a bridge between Rust's
Tokioand the target language's async/await (e.g., viauniffi::exportwhich handlesasync fn).
A minimal executable crate for infrastructure providers.
- Dependencies: Depends on
scp2p-corebut disables optional features likesearchandlocal-storagewhere possible to minimize footprint. - CLI Interface: Uses
clapfor configuration (ports, bootstrap peers, bandwidth limits). - Service Support: Include
systemdunit files and Docker Compose templates for easy deployment.
- GitHub Actions:
- Build binaries for
x86_64andaarch64(ARM) across Windows, Linux (musl), and macOS. - Automate
cargo publish,npm publish, andmaturin publish. - Generate and upload
.deb,.rpm,.msi, and.dmgartifacts to GitHub Releases.
- Build binaries for
- Release Channel: Maintain
stableandnightlychannels for library consumers.