nandi/jolt-nativepublic Fork 0
3b4eb6b44f7794275c512c47b0abecc452202513
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 · 81 lines · 4.2 KBTOML Blame HistoryRaw
Lift freeq's AV media plane out of sleek 90f8b89 nandi 19d ago1# 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]
20resolver = "2"
Bring vidya in cfd3e36 nandi 19d ago21members = [
22 "crates/jolt-abi",
23 "crates/jolt-moq",
24 "crates/jolt-vidya",
25 "crates/vidya-core",
26]
Build under buck2, with the toolchain pinned rather than found 460541b nandi 19d ago27# The third-party tree is reindeer's, not this workspace's: it carries its own
28# lockfile and the vendored cpal that patches the floating one. Without
29# excluding it, `cargo test --workspace` builds cpal's own default feature set
30# — which reaches for the Windows ASIO SDK and fails on Linux.
31exclude = ["third-party/rust"]
Lift freeq's AV media plane out of sleek 90f8b89 nandi 19d ago32
33[workspace.package]
34version = "0.1.0"
35edition = "2021"
36license = "MIT"
37repository = "https://gitlab.com/nandithebull/jolt-native"
38
Bring vidya in cfd3e36 nandi 19d ago39# vidya-ffi set opt-level 2 when it was its own workspace: the tree walk and
40# the texture uploads are hot every frame, and a debug build of them is not
41# worth looking at. A member cannot set this, so it is set here.
42[profile.release]
43opt-level = 2
Ship the object without the notes nobody reads aabacba nandi 18d ago44# The same pair the buck2 cdylib sets in crates/jolt-vidya/BUCK, so the two
45# builds of libvidya agree on more than opt-level. 1.5M off the desktop object;
46# opt-level 3 was measured alongside and is larger, so it stays at 2.
47lto = "fat"
48codegen-units = 1
Bring vidya in cfd3e36 nandi 19d ago49
Lift freeq's AV media plane out of sleek 90f8b89 nandi 19d ago50[workspace.dependencies]
51jolt-abi = { path = "crates/jolt-abi" }
52log = "0.4"
53
54# iroh-live wants an unreleased iroh 0.97 — the released one has no
55# `tls-aws-lc-rs` feature and resolution fails outright without these. The revs
56# are the ones freeq locks in its own workspace; they travel together and are
57# not independently bumpable.
58[patch.crates-io]
59iroh = { git = "https://github.com/n0-computer/iroh", rev = "8af8370b" }
60iroh-base = { git = "https://github.com/n0-computer/iroh", rev = "8af8370b" }
61iroh-relay = { git = "https://github.com/n0-computer/iroh", rev = "8af8370b" }
62iroh-gossip = { git = "https://github.com/n0-computer/iroh-gossip", rev = "1038f721" }
63# noq's main tip is 1.1.0, which breaks iroh 0.97 — pin the rev freeq pins.
64noq = { git = "https://github.com/n0-computer/noq", rev = "ab042ea7e3f7bae1e43eaba2ac9dba47ddb52e69" }
65noq-proto = { git = "https://github.com/n0-computer/noq", rev = "ab042ea7e3f7bae1e43eaba2ac9dba47ddb52e69" }
66noq-udp = { git = "https://github.com/n0-computer/noq", rev = "ab042ea7e3f7bae1e43eaba2ac9dba47ddb52e69" }
67web-transport-iroh = { git = "https://github.com/Frando/web-transport", rev = "f7a523f1" }
68web-transport-noq = { git = "https://github.com/Frando/web-transport", rev = "f7a523f1" }
69web-transport-proto = { git = "https://github.com/Frando/web-transport", rev = "f7a523f1" }
70web-transport-trait = { git = "https://github.com/Frando/web-transport", rev = "f7a523f1" }
71
72# moq-media (inside iroh-live) asks for cpal on `branch = "master"`, which
73# floats — and master has since removed `StreamError` and `DeviceTrait::name()`
74# in favour of a unified error API, which does not compile against the
75# iroh-live rev pinned below. Pin the last commit that does. sleek vendors this
76# same commit into its tree; a pinned rev says the same thing without carrying
77# Cargo will not let a patch retarget the same source it replaces, so this has
78# to be a vendored path rather than a pinned rev of the same URL. Drop the
79# vendor and this patch when iroh-live moves to the new cpal API.
80[patch."https://github.com/RustAudio/cpal.git"]
Build under buck2, with the toolchain pinned rather than found 460541b nandi 19d ago81cpal = { path = "third-party/rust/cpal" }