Read CONTRIBUTING.md before making any code change. It lists what a pull request needs: the problem, your setup, evidence from real hardware, and tests. Those rules apply to agents as much as to people.
Omdrop is moving from bash and Python to Rust. All new development goes into the Rust version in core/. Until 1.0.0, this repository still holds both implementations of the same programs:
| Program | Bash and Python (fallback) | Rust, in core/ |
|---|---|---|
The omdrop command |
bin/omdrop, bin/pick.py |
core/crates/omdrop-cli |
| The receiver | bin/airdrop-serve.py |
core/crates/omdrop-receiver |
| Identity and Contacts Only | bin/identity.py, bin/contacts.py |
core/crates/omdrop-identity, core/crates/omdrop-proto |
| Sender, advertisers, root helper | in the radio backend (omdrop-awdl, omdrop-owl) | core/crates/omdrop-send, omdrop-adv, omdrop-radio |
The panel (Panel.qml and the other QML files), the agent skill (skills/) and the link handler belong to the plugin only; they have no Rust counterpart.
Omdrop runs the Rust version wherever the radio backend supports it, and the bash and Python programs elsewhere. Today that is omdrop-awdl and omdrop-bcm4360. omdrop-owl (from Owly) ships core's hooks since 0.4.0, so the plugin hands commands to a core that is already installed there, but setup and doctor don't offer core on it until core has been tested on owl hardware (core_supported in bin/omdrop, #73). With a supported backend, omdrop setup and omdrop doctor offer core, omdrop install-core installs it, and the plugin then hands it every command.
Epic #73 tracks the migration. Rust becomes the only implementation in 1.0.0, once this plugin, omdrop-awdl and omdrop-owl all run on it.
- Change the Rust version only. The bash and Python programs remain as the fallback for installs without omdrop-core and are not developed further; don't add features to them or port changes back. There are two exceptions. A security fix is accepted for the Python too, since installs without core still run it. Installing core (
omdrop install-core, anddoctoroffering it) lives inbin/omdrop, because it runs before core exists; core'sinstall-coreruns that one. The bash and Python programs are removed at 1.0.0. - Keep the Rust programs drop-in. Each replaces a current program with the same arguments, output, files and exit codes, because the panel and existing installs depend on them.
- Test in
core/:cargo test --workspace,cargo clippy --workspace --all-targets -- -D warnings,cargo fmt --check. Run them as an ordinary user, never as root. If you touch the plugin side (bin/omdrop's hand-off, the QML), also run the Python suite from the repository root:python3 -m unittest discover -s tests. - Know which stack you are running.
bin/omdropis the one entry point: core's package puts itsomdropat/usr/lib/omdrop-core/omdrop, offPATH. When that core reports at leastCORE_MIN(inbin/omdrop) and the radio backend ships core's hooks (/usr/lib/omdrop/radio/probe),bin/omdrophands every command to it, including the command-line tests. An older core, one whose version can't be read, or a backend without hooks gets none.OMDROP_IMPLEMENTATION=pythonkeeps the bash and Python programs;rustrequires a core at leastCORE_MINand a backend with hooks. - The
omdroppackage (omarchy-pkgs/pkgbuilds/omdrop/, for omacom/omarchy-pkgs) installs the plugin at/usr/share/omdrop, core at/usr/lib/omdrop-core, and/usr/bin/omdropas a link to the plugin'sbin/omdrop, never to core.setuplinks the packaged plugin into~/.config/omarchy/plugins, asking before it replaces another copy. Update the recipe'spkgverwith each release. - Never run core from this checkout as root, and never point a polkit action or a systemd unit at it. Core is built and installed as its own package (
omdrop install-core, ormakepkg -siincore/). Its root helper must sit at a fixed, root-owned path, or any user could gain root through it. - Bump
core/PKGBUILD'spkgverorpkgrelin any release that changescore/. It is howinstall-coreanddoctortell an installed core is older than the plugin's. - Raise
CORE_MINinbin/omdropwhen the plugin starts relying on something new in core, together with apkgverbump incore/PKGBUILDandcore/Cargo.toml. Core reports only itspkgver, so apkgrelbump can't be required. - Pin the omdrop-awdl driver in both stacks at once:
DRIVER_COMMIT,DRIVER_VERSIONand the literal commit in the build script, inbin/omdropand incore/crates/omdrop-cli/src/driver.rs. Core runsinstall-driver, so a new pin also needs a corepkgverbump andCORE_MINraised to it. - Radio backends talk to core through hooks, described in
core/docs/backend-contract.md. Hooks ship with the backend (omdrop-awdl, omdrop-owl), not with core. A change to the contract affects every backend, so propose it in an issue first.
- Don't touch a live radio. Tests must not depend on the machine they run on, and must not transmit. The Rust tests that run the real sender do so in a private network namespace and skip where one is unavailable; keep it that way.
- The receiver handles untrusted input. Anything nearby can send to it in Everyone mode. A change there must keep the existing size, member and disk limits, and say what a hostile sender could do with the new code path (CONTRIBUTING.md, "Receiver changes").
- Logs and dumps can identify people. Follow CONTRIBUTING.md, "Before you share logs", before pasting any into an issue or pull request.