README.md (3982B)
1  2 3 Build local food networks that help farms and communities organize and communicate. 4 5 **What it does:** Radroots specifies the event and networking foundations for building interoperable local food networks, where governance and data ownership remain in the hands of the communities that run them. 6 7 **[Install](https://radroots.dev/docs/install)** 8 | [Docs](https://radroots.dev/docs) 9 | [Examples](https://radroots.dev/docs/examples) 10 | [Releases](https://radroots.dev/downloads/) 11 | [License](#license) 12 13 ### Use cases 14 - Farmers post what they are growing and receive orders for upcoming harvests 15 - Food hubs organize group buying across farms, households and local businesses 16 - Farms and food hubs schedule drops and market days where buyers pick up orders 17 - Restaurants and local businesses arrange regular orders directly with nearby farms 18 - Local couriers carry orders from farms to homes, businesses and pickup points 19 20 ### How to use 21 22 The current ordinary Client supports explicit in-memory preview and native 23 public-cache resource ownership. Authenticated workspace commands and the full 24 durable commerce workflow remain in implementation. 25 26 ```rust 27 use radroots::{Client, StartMode}; 28 29 async fn preview() -> radroots::Result<()> { 30 let client = Client::preview(); 31 client.start(StartMode::LocalOnly).await?; 32 client.close().await?; 33 Ok(()) 34 } 35 ``` 36 37 See [the ordinary package](crates/radroots/README.md) for current implemented 38 boundaries and explicit native opening. Construction does not start networking, 39 restore authority or replay business writes. 40 41 ### Getting started 42 43 > **Status:** Alpha (`0.1.0-alpha`) 44 > Still a `draft`. Not recommended for use before `0.1.0` is published. 45 46 The Radroots libraries are a Rust workspace with a small set of native build 47 dependencies. Governed repository commands use `cargo extbuild`; see 48 [`BUILD.md`](BUILD.md) for the complete native setup guide. 49 50 #### Governed development 51 52 After installing the native dependencies below and configuring extbuild: 53 54 ```sh 55 git clone https://radroots.dev/git/lib.git && cd lib 56 57 cargo extbuild doctor 58 cargo extbuild run -- cargo check --workspace --locked 59 ``` 60 61 Checked-in Nix expressions are deferred compatibility surfaces. Nix 62 evaluation and Nix-derived packages, apps, checks, development shells, NixOS 63 modules, and OCI outputs are not current qualification prerequisites. 64 65 #### macOS and Linux 66 67 To setup manually, install [Rust](https://rustup.rs/), Git, LLVM/Clang with `libclang`, `pkg-config`, and `libsodium`. 68 69 On macOS with Homebrew: 70 71 ```sh 72 brew install llvm pkgconf libsodium 73 export LIBCLANG_PATH="$(brew --prefix llvm)/lib" 74 ``` 75 76 On Debian or Ubuntu: 77 78 ```sh 79 sudo apt install build-essential clang libclang-dev pkg-config libsodium-dev 80 ``` 81 82 Then clone and check the workspace: 83 84 ```sh 85 git clone https://radroots.dev/git/lib.git && cd lib 86 87 export SODIUM_USE_PKG_CONFIG=1 88 cargo check --workspace --locked 89 ``` 90 91 On macOS, if `bindgen` cannot locate the system headers: 92 93 ```sh 94 export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)" 95 export BINDGEN_EXTRA_CLANG_ARGS="--sysroot=${SDKROOT}" 96 ``` 97 98 #### SP1 (*optional*) 99 100 SP1 is required to compile programs and generate proofs. Install Protocol Buffers and the SP1 toolchain: 101 102 ```sh 103 # macOS 104 brew install protobuf 105 106 # Debian or Ubuntu 107 sudo apt install protobuf-compiler 108 109 curl -L https://sp1up.succinct.xyz | bash 110 sp1up 111 ``` 112 113 Run proof generation in release mode. CUDA proving is supported on compatible Linux systems, not on macOS. See [`BUILD.md`](BUILD.md) for the complete setup. 114 115 ## Status 116 117 Radroots is under active development. The API is not yet stable and will change quite often. 118 119 ## License 120 121 This repository is licensed under either: 122 123 - [Apache License 2.0](LICENSE-APACHE), or 124 - [MIT License](LICENSE-MIT), 125 126 at your option. 127 128 Vendored or third-party material retains its own notices and license.