Rust and in-browser Railgun wallet for private Ethereum transactions, signed on a Xous dabao device

RailBao is a Railgun privacy wallet written in Rust. It runs either as a local daemon with a web interface or as a static website, where the wallet engine is compiled to WebAssembly and runs entirely in the browser. For this hackathon we added a hardware signer: a dabao board running the Xous microkernel. It holds the Railgun spending and viewing keys and signs private transfers with Poseidon-EdDSA. It also signs the Ethereum transactions of the public account. The browser talks to it over WebHID with a small CBOR protocol.
Device side. The signer is a Rust app for Xous, the microkernel that runs on Baochip's dabao board. It reuses an earlier dabao Ethereum burner wallet developed for Devcon 8 workshops. That brings the seed (created from the chip's random number generator on first boot and kept in on-chip ReRAM), the USB HID transport, and a CBOR protocol that wraps ERC-4527 Ethereum signing requests. We added Railgun commands to it:
Host side. rsgun-wallet is a Rust wallet on the kohaku Railgun SDK. We added a railgun-dabao crate with:
The wallet runs either as a local daemon or as a static site, with the engine compiled to WebAssembly and running in a Web Worker. The browser build uses Waku to talk to Railgun broadcasters.
How the partner tech helped. Because kohaku's signer interface is generic, the dabao became a drop-in alternative to a Ledger. Railgun's engine fixed the derivation paths, and its proof of innocence and broadcaster networks worked unchanged.
Hacky bits:
Everything was tested end to end on Sepolia (shield, private transfer, unshield).

