nandi/jolt-nativepublic Fork 0
dce285fb5a5ec1f331b8afa7b2bdc4ed5e1bbd46
Commits
Clone
git clone https://git.rickub.com/nandi/jolt-native.git
git clone ssh://git@rickub.com/nandi/jolt-native.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Cargo.toml · 170 lines · 8.8 KBTOML Blame HistoryRaw
Build under buck2, with the toolchain pinned rather than found 460541b nandi 19d ago1# The third-party graph, as one manifest for reindeer to vendor and generate
2# BUCK targets from. Every external crate the workspace's four members depend
3# on appears here once, with the union of the features they ask for; first-party
4# crates keep their own BUCK files and depend on `//third-party/rust:<name>`.
5#
Give the third-party crates a platform to be Android on 0238622 nandi 19d ago6# Android-only dependencies are at the bottom, in a target section, so their
7# features are resolved for the device and unified into nothing else.
Build under buck2, with the toolchain pinned rather than found 460541b nandi 19d ago8[package]
9name = "jolt-native-third-party"
10version = "0.0.0"
11edition = "2021"
12publish = false
13
14# Its own workspace: reindeer resolves this graph on its own, and the root
15# workspace must not try to make it a member.
16[workspace]
17
18# Nothing is compiled from here; the manifest exists to pin a graph.
19[lib]
20path = "lib.rs"
21
22[dependencies]
23anyhow = "1"
24# cpal's cross-platform sample trait; see the note above the patch table.
25dasp_sample = "0.11"
26# `image-data` is the clipboard path for a pasted picture; egui does not deliver
27# one. Desktop only — arboard has no Android backend.
28arboard = { version = "3", default-features = false, features = ["image-data"] }
29# Without cpal's `pipewire` feature, which is on by default under cargo: it
30# builds libspa-sys, which wants pkg-config and PipeWire's headers on the build
31# machine — the one system dependency the zig toolchain cannot stand in for.
32# The buck2 build is therefore `--no-default-features` shaped for now: ALSA PCM
33# names only, everything else equal.
34cpal = { path = "cpal" }
35# `default_fonts` because a shared library has no host app to install a font set
36# for it. vidya-core turns egui's defaults off; the union is what gets built.
Paint the same tree into a terminal, for the machines with no window a7f6202 nandi 17d ago37# The terminal jolt-tui paints into. `events` only: the crate's default set
38# reaches for a Windows console API and a serde derive, and neither the reader
39# nor the writer here wants either.
40crossterm = { version = "0.28", default-features = false, features = ["events"] }
Build under buck2, with the toolchain pinned rather than found 460541b nandi 19d ago41egui = { version = "0.31", features = ["default_fonts"] }
42egui-winit = "0.31"
43egui_glow = "0.31"
44env_logger = "0.11"
45glow = "0.16"
46glutin = "0.32"
47glutin-winit = "0.5"
48# JPEG only — the V4L2 path converts MJPEG frames, and nothing here reads or
49# writes a picture file.
50image = { version = "0.25", default-features = false, features = ["jpeg"] }
Let the media plane cross to the phone, camera and all fd0e21a nandi 18d ago51# `capture-camera` is NOT here: features declared on a shared dependency are
52# resolved for every platform, and rusty-capture is V4L2 and friends. It goes in
53# the desktop target section below, so the phone's graph never reaches it.
Build under buck2, with the toolchain pinned rather than found 460541b nandi 19d ago54iroh-live = { git = "https://github.com/n0-computer/iroh-live", rev = "edd9bcc530a615f3ab3a6919e96790a077905376", default-features = false, features = [
55 "opus",
56 "h264",
57] }
58libc = "0.2"
59log = "0.4"
60moq-lite = { git = "https://github.com/Frando/moq", branch = "deps/iroh-main" }
61moq-native = { git = "https://github.com/Frando/moq", branch = "deps/iroh-main", default-features = false, features = [
62 "noq",
63 "websocket",
64 "aws-lc-rs",
65] }
66mp4 = "0.14"
67n0-future = "0.3"
68# C++, which is why the toolchain needs both halves of zig.
69openh264 = { version = "0.9", default-features = false, features = ["source"] }
70png = "0.17"
71rand = "0.8"
72# aws-lc-rs rather than ring, to match what moq-native and iroh already pull in.
73rustls = { version = "0.23", default-features = false, features = ["aws-lc-rs"] }
74tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "time"] }
75# One query parameter (`inst=`) needs escaping. That is the whole use.
76urlencoding = "2"
77url = "2"
78# V4L2 capture: the fallback path for cameras rusty-capture mishandles.
79v4l2r = "0.0.7"
80winit = "0.30"
81zip = { version = "2", default-features = false, features = ["deflate"] }
82
83# Carried over from the workspace root verbatim: iroh-live wants an unreleased
84# iroh 0.97, and the revs are the ones freeq locks. They travel together and are
85# not independently bumpable.
86# cpal's own dependencies, named here so reindeer gives them public aliases:
87# the hand-written target in cpal/BUCK lives in a different package, and
88# reindeer only makes top-level deps visible outside its own.
89[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd"))'.dependencies]
90alsa = "0.11"
91
92[target.'cfg(target_vendor = "apple")'.dependencies]
93coreaudio-rs = { version = "0.14", default-features = false, features = ["core_audio", "audio_toolbox"] }
94mach2 = "0.5"
95objc2 = "0.6"
96objc2-audio-toolbox = { version = "0.3", default-features = false, features = ["std", "AUComponent", "AudioUnitProperties"] }
97objc2-core-audio = { version = "0.3", default-features = false, features = ["std", "AudioHardware", "AudioHardwareDeprecated", "objc2", "objc2-foundation"] }
98objc2-core-audio-types = { version = "0.3", default-features = false, features = ["std", "CoreAudioBaseTypes"] }
99objc2-core-foundation = "0.3"
100objc2-foundation = "0.3"
101
Let the media plane cross to the phone, camera and all fd0e21a nandi 18d ago102# The camera, on a machine that has one behind an ioctl. See the note on the
103# shared `iroh-live` above for why the feature is here rather than there.
104[target.'cfg(not(target_os = "android"))'.dependencies]
105iroh-live = { git = "https://github.com/n0-computer/iroh-live", rev = "edd9bcc530a615f3ab3a6919e96790a077905376", default-features = false, features = [
106 "capture-camera",
107] }
108
109# The device. Both objects cross now: libvidya for the UI, and libjoltmoq for
110# the media plane, whose camera is Camera2 over JNI rather than V4L2 and whose
111# audio is cpal's AAudio host rather than PipeWire.
Give the third-party crates a platform to be Android on 0238622 nandi 19d ago112[target.'cfg(target_os = "android")'.dependencies]
Let the media plane cross to the phone, camera and all fd0e21a nandi 18d ago113# NOT `capture-camera`, for the reason given on the shared `iroh-live` above.
114# `android` is a different feature and a needed one: it links `ndk`, which
115# rusty-codecs' format.rs references under cfg(android) for the MediaCodec path,
116# and without it the crate fails on its own imports.
117iroh-live = { git = "https://github.com/n0-computer/iroh-live", rev = "edd9bcc530a615f3ab3a6919e96790a077905376", default-features = false, features = [
118 "android",
119] }
Give the third-party crates a platform to be Android on 0238622 nandi 19d ago120# `vidya_open_url` is an ACTION_VIEW intent there, which is a JNI call against
Let the media plane cross to the phone, camera and all fd0e21a nandi 18d ago121# the activity the glue holds; libjoltmoq's Camera2 bridge is the other caller.
Give the third-party crates a platform to be Android on 0238622 nandi 19d ago122#
123# Renamed because cpal wants jni 0.21 on the same platform, and cpal is a path
124# dependency above — so reindeer gives its deps public aliases too, and two
125# crates called `jni` cannot both have one. The consumer says `named_deps`.
126jni-0-22 = { package = "jni", version = "0.22" }
Let the media plane cross to the phone, camera and all fd0e21a nandi 18d ago127# cpal's AAudio host, and the crates it reaches it through. cpal is a path
128# dependency, so its own manifest cannot give these public aliases — they are
129# named here for the same reason the alsa and coreaudio rows above are, and
130# ../cpal/BUCK's Android row is what consumes them.
131#
132# `audio` is the AAudio binding itself and `api-level-26` is the floor it needs;
133# without either, cpal's android host compiles against imports that are not
134# there. This unions with the plain `ndk` iroh-live asks for above.
135ndk = { version = "0.9", default-features = false, features = [
136 "audio",
137 "api-level-26",
138] }
139ndk-context = "0.1"
140# The unrenamed one, and cpal's: 0.21, not the 0.22 above.
141jni = "0.21"
142num-derive = "0.4"
143num-traits = "0.2"
Give the third-party crates a platform to be Android on 0238622 nandi 19d ago144# The feature is what pulls in android-activity, and android-activity is what
145# owns the event loop: the APK's NativeActivity has no Java main to call into,
146# so the glue is the entry point. Without it the crate compiles to a backend of
147# no platform at all and fails on its own imports.
148winit = { version = "0.30", features = ["android-native-activity"] }
149
Build under buck2, with the toolchain pinned rather than found 460541b nandi 19d ago150[patch.crates-io]
151iroh = { git = "https://github.com/n0-computer/iroh", rev = "8af8370b" }
152iroh-base = { git = "https://github.com/n0-computer/iroh", rev = "8af8370b" }
153iroh-relay = { git = "https://github.com/n0-computer/iroh", rev = "8af8370b" }
154iroh-gossip = { git = "https://github.com/n0-computer/iroh-gossip", rev = "1038f721" }
155noq = { git = "https://github.com/n0-computer/noq", rev = "ab042ea7e3f7bae1e43eaba2ac9dba47ddb52e69" }
156noq-proto = { git = "https://github.com/n0-computer/noq", rev = "ab042ea7e3f7bae1e43eaba2ac9dba47ddb52e69" }
157noq-udp = { git = "https://github.com/n0-computer/noq", rev = "ab042ea7e3f7bae1e43eaba2ac9dba47ddb52e69" }
158web-transport-iroh = { git = "https://github.com/Frando/web-transport", rev = "f7a523f1" }
159web-transport-noq = { git = "https://github.com/Frando/web-transport", rev = "f7a523f1" }
160web-transport-proto = { git = "https://github.com/Frando/web-transport", rev = "f7a523f1" }
161web-transport-trait = { git = "https://github.com/Frando/web-transport", rev = "f7a523f1" }
162
163# moq-media (inside iroh-live) asks for cpal on `branch = "master"`, which
164# floats, and master no longer compiles against the iroh-live rev pinned above.
165# The vendored copy is the last commit that does — 63ea9ff upstream, per its
166# .cargo_vcs_info.json. It has to be a path rather than that rev: cargo
167# canonicalises the URL, so naming the same repo without `.git` is still "the
168# same source", which a patch may not retarget.
169[patch."https://github.com/RustAudio/cpal.git"]
170cpal = { path = "cpal" }