Rust

statime

Implementation of the Precision Time Protocol (PTP) in Rust

P

pendulum-project

Dernière activité 28 sept. 2026
pendulum-project/statime

318

étoiles

37

forks

31

issues ouvertes

clockieee1588ptptimetime-synchronization

Ce README est souvent en anglais.

Statime

codecov book book

Statime is a library providing an implementation of PTP version 2.1 (IEEE1588-2019). It provides all the building blocks to setup PTP ordinary and boundary clocks.

It is designed to be able to work with many different underlying platforms, including embedded targets. This does mean that it cannot use the standard library and platform specific libraries to interact with the system clock and to access the network. That needs to be provided by the user of the library.

On modern Linux kernels, the statime-linux crate provides a ready to use PTP daemon. See our getting started guide.

If you want to use Statime on platforms other than Linux, you will need to implement a suitable binary yourself. The statime-stm32 crate gives an example of how to do this on an embedded target.

Statime - PTP in Rust

Structure

The statime library has been built in a way to try and be platform-agnostic. To do that, the network and clock have been abstracted. The statime-linux library provides implementations of these abstractions for linux-based platforms. For other platforms, this needs to be provided by the user. For more details, see the documentation

Rust version

Statime requires Rust version 1.69 at minimum. The easiest way to install Rust is through rustup

Running from source

Because of the use of ports 319 and 320 in the PTP protocol, statime-linux needs to be run as root. It is best to build it as a non-root user with

cargo build

and then run it as root with

sudo ./target/debug/statime -i <ETHERNET INTERFACE NAME>

Roadmap

See the Statime page on trifectatech.org.

Support our work

Statime is governed by the Trifecta Tech Foundation. We continuously seek the involvement of interested parties and funding for future work. Reach out to contact@trifectatech.org if you're interested.

Thanks to

The initial development of Statime was supported by the NGI Assure Fund of the NLnet Foundation. In 2023, Sovereign Tech Agency invested in Pendulum (Statime and ntpd-rs). Read more on their website.

For all past and present funders and supporters, see the Statime page on trifectatech.org.

Logo NLnet

Logo NGI Assure

Logo STF

Projets similaires

A full-featured implementation of the Network Time Protocol, including NTS support.

Rustclockntpntp-client
Ppendulum-project
1,1 k étoiles93

A comprehensive open-source book on the Precision Time Protocol (IEEE 1588/gPTP). From thought experiments to protocol internals, LinuxPTP source code analysis, and a hands-on ptp-lite implementation (~1000 lines C). A complete guide from theory to running code.

Cautomotivebookc
LLularible
216 étoiles16

Develop an end-to-end hypothetical reference model, network architectures, precision time tools, performance objectives and the methods to distribute, operate, monitor time synchronization within data center and much more...

Cieee3335ntppcie
TTime-Appliances-Project
1,5 k étoiles122