| Lift freeq's AV media plane out of sleek 90f8b89 nandi 20d ago | 1 | # One repo, one crate per shared object. |
| 2 | # |
| 3 | # Every crate here builds a `.so` that a jolt library binds through |
| 4 | # `jolt.ffi/defcfn`, plus `jolt-abi`, which is the rules they all keep at the |
| 5 | # edge rather than a library anyone loads. |
| 6 | # |
| 7 | # Deliberately NOT one cdylib with cargo features selecting the parts. Features |
| 8 | # are additive within a library, so `graphics` + `moq` would mean one object |
| 9 | # carrying egui *and* QUIC, Opus, H.264 and the camera stacks — a chat client |
| 10 | # that is not in a call would link the whole media plane to open a window. The |
| 11 | # feature unification that comes with it has bitten this code before: enabling |
| 12 | # eframe's wayland/x11 features for the desktop build pulled them into the |
| 13 | # Android one and made the activity exit on launch. |
| 14 | # |
| 15 | # A workspace gives the parts of a monorepo worth having — one CI, one release, |
| 16 | # shared conventions in `jolt-abi` — while each consumer still links only what |
| 17 | # it asked for. jolt's `:jolt/native` is a vector; naming two objects there is |
| 18 | # no harder than naming one. |
| 19 | [workspace] |
| 20 | resolver = "2" |
| Bring vidya in cfd3e36 nandi 19d ago | 21 | members = [ |
| 22 | "crates/jolt-abi", |
| 23 | "crates/jolt-moq", |
| Paint the same tree into a terminal, for the machines with no window a7f6202 nandi 17d ago | 24 | "crates/jolt-tui", |
| Bring vidya in cfd3e36 nandi 19d ago | 25 | "crates/jolt-vidya", |
| 26 | "crates/vidya-core", |
| 27 | ] |
| Pin the toolchain with a flake, and let buck2 and DotSlash go 5ae197f nandi 13d ago | 28 | # All that is left under third-party/ is the vendored cpal the [patch] below |
| 29 | # retargets — reindeer's generated graph went away with buck2, and Cargo.lock is |
| 30 | # the one dependency graph now. It stays excluded because a workspace member is |
| 31 | # built with its own default features, and cpal's defaults reach for the Windows |
| 32 | # ASIO SDK and fail on Linux. As a path dependency it is built with the features |
| 33 | # its consumers ask for instead. |
| Build under buck2, with the toolchain pinned rather than found 460541b nandi 19d ago | 34 | exclude = ["third-party/rust"] |
| Lift freeq's AV media plane out of sleek 90f8b89 nandi 20d ago | 35 | |
| 36 | [workspace.package] |
| 37 | version = "0.1.0" |
| 38 | edition = "2021" |
| 39 | license = "MIT" |
| 40 | repository = "https://gitlab.com/nandithebull/jolt-native" |
| 41 | |
| Bring vidya in cfd3e36 nandi 19d ago | 42 | # vidya-ffi set opt-level 2 when it was its own workspace: the tree walk and |
| 43 | # the texture uploads are hot every frame, and a debug build of them is not |
| 44 | # worth looking at. A member cannot set this, so it is set here. |
| 45 | [profile.release] |
| 46 | opt-level = 2 |
| Pin the toolchain with a flake, and let buck2 and DotSlash go 5ae197f nandi 13d ago | 47 | # 1.5M off the desktop object; opt-level 3 was measured alongside and is larger, |
| 48 | # so it stays at 2. |
| Ship the object without the notes nobody reads aabacba nandi 18d ago | 49 | lto = "fat" |
| 50 | codegen-units = 1 |
| Bring vidya in cfd3e36 nandi 19d ago | 51 | |
| Lift freeq's AV media plane out of sleek 90f8b89 nandi 20d ago | 52 | [workspace.dependencies] |
| 53 | jolt-abi = { path = "crates/jolt-abi" } |
| 54 | log = "0.4" |
| 55 | |
| 56 | # iroh-live wants an unreleased iroh 0.97 — the released one has no |
| 57 | # `tls-aws-lc-rs` feature and resolution fails outright without these. The revs |
| 58 | # are the ones freeq locks in its own workspace; they travel together and are |
| 59 | # not independently bumpable. |
| 60 | [patch.crates-io] |
| 61 | iroh = { git = "https://github.com/n0-computer/iroh", rev = "8af8370b" } |
| 62 | iroh-base = { git = "https://github.com/n0-computer/iroh", rev = "8af8370b" } |
| 63 | iroh-relay = { git = "https://github.com/n0-computer/iroh", rev = "8af8370b" } |
| 64 | iroh-gossip = { git = "https://github.com/n0-computer/iroh-gossip", rev = "1038f721" } |
| 65 | # noq's main tip is 1.1.0, which breaks iroh 0.97 — pin the rev freeq pins. |
| 66 | noq = { git = "https://github.com/n0-computer/noq", rev = "ab042ea7e3f7bae1e43eaba2ac9dba47ddb52e69" } |
| 67 | noq-proto = { git = "https://github.com/n0-computer/noq", rev = "ab042ea7e3f7bae1e43eaba2ac9dba47ddb52e69" } |
| 68 | noq-udp = { git = "https://github.com/n0-computer/noq", rev = "ab042ea7e3f7bae1e43eaba2ac9dba47ddb52e69" } |
| 69 | web-transport-iroh = { git = "https://github.com/Frando/web-transport", rev = "f7a523f1" } |
| 70 | web-transport-noq = { git = "https://github.com/Frando/web-transport", rev = "f7a523f1" } |
| 71 | web-transport-proto = { git = "https://github.com/Frando/web-transport", rev = "f7a523f1" } |
| 72 | web-transport-trait = { git = "https://github.com/Frando/web-transport", rev = "f7a523f1" } |
| 73 | |
| 74 | # moq-media (inside iroh-live) asks for cpal on `branch = "master"`, which |
| 75 | # floats — and master has since removed `StreamError` and `DeviceTrait::name()` |
| 76 | # in favour of a unified error API, which does not compile against the |
| 77 | # iroh-live rev pinned below. Pin the last commit that does. sleek vendors this |
| 78 | # same commit into its tree; a pinned rev says the same thing without carrying |
| 79 | # Cargo will not let a patch retarget the same source it replaces, so this has |
| 80 | # to be a vendored path rather than a pinned rev of the same URL. Drop the |
| 81 | # vendor and this patch when iroh-live moves to the new cpal API. |
| 82 | [patch."https://github.com/RustAudio/cpal.git"] |
| Build under buck2, with the toolchain pinned rather than found 460541b nandi 19d ago | 83 | cpal = { path = "third-party/rust/cpal" } |