1Building geckodriver 2==================== 3 4geckodriver is written in [Rust], a systems programming language 5from Mozilla. Crucially, it relies on the [webdriver crate] to 6provide the HTTPD and do most of the heavy lifting of marshalling 7the WebDriver protocol. geckodriver translates WebDriver [commands], 8[responses], and [errors] to the [Marionette protocol], and acts 9as a proxy between [WebDriver] and [Marionette]. 10 11To build geckodriver: 12 13 % ./mach build testing/geckodriver 14 15If you use artifact builds you may build geckodriver using cargo, 16since mach in this case does not have a compile environment: 17 18 % cd testing/geckodriver 19 % cargo build 20 … 21 Compiling geckodriver v0.21.0 (file:///home/ato/src/gecko/testing/geckodriver) 22 … 23 Finished dev [optimized + debuginfo] target(s) in 7.83s 24 25Because all Rust code in central shares the same cargo workspace, 26the binary will be put in the `$(topsrcdir)/target` directory. 27 28You can run your freshly built geckodriver this way: 29 30 % ./mach geckodriver -- --other --flags 31 32See [Testing](Testing.html) for how to run tests. 33 34[Rust]: https://www.rust-lang.org/ 35[webdriver crate]: https://crates.io/crates/webdriver 36[commands]: https://docs.rs/webdriver/newest/webdriver/command/ 37[responses]: https://docs.rs/webdriver/newest/webdriver/response/ 38[errors]: https://docs.rs/webdriver/newest/webdriver/error/enum.ErrorStatus.html 39[Marionette protocol]: /testing/marionette/doc/marionette/Protocol.html 40[WebDriver]: https://w3c.github.io/webdriver/ 41[Marionette]: /testing/marionette/doc/marionette 42