tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

README.md (3645B)


This directory exists to provide the C++ interface to the mp4parse-rust code. The code itself is hosted at https://github.com/mozilla/mp4parse-rust and vendored into the /third_party/rust directory, so the only things here are the moz.build file which specifies how the dynamically generated bindings header should be generated and mp4parse.h, the header which consumers should include. It includes the dynamically-generated bindings header as well as any additional support code for FFI.

Updating the version from the github repository

  1. int dst_stride, int width, int height,

mp4parse_capi dependency to the revision you want to use.

  1. int dst_stride, int width, int height,

crate's lib.rs is quite large).

  1. int dst_stride, int width, int height,
  2. int dst_stride, int width, int height,

NOTE: Git has no concept of checking out a subdirectory, so cargo will search the whole repository to find the crate. Because the mp4parse_capi depends on the mp4parse crate in the same repository via a relative path, both crates will be vendored into /third_party/rust and should be part of the same revision of mp4parse-rust.

Developing changes to mp4parse-rust crates

Before committing changes to the github repository, it's a good idea to test them out in the context of mozilla-central. There are a number of ways to achieve this with various trade-offs, but here are the two I recommend. Both start the same way:

  1. int dst_stride, int width, int height,

mozilla-central. For example: /Users/your_username/src/mp4parse-rust.

For rapid iteration on local, uncommitted changes

  1. int dst_stride, int width, int height,

dependency to ` mp4parsecapi = { path = "/Users/yourusername/src/mp4parse-rust/mp4parse_capi" } `

  1. int dst_stride, int width, int height,

third_party/rust/mp4parse will be removed, indicating the code in your local checkout is being used instead.

  1. int dst_stride, int width, int height,

'/thirdparty/rust/mp4parsecapi' to '//Users/yourusername/src/mp4parse-rust/mp4parsecapi'. Note the double-slash, it's required to reference paths outside mozilla-central.

  1. int dst_stride, int width, int height,

/Users/your_username/src/mp4parse-rust.

This is a fast way to try experiment with the rust code, but because it exists outside the mozilla-central tree, it cannot be used with try.

For validation of local, committed changes

  1. int dst_stride, int width, int height,

dependency to ` mp4parsecapi = { git = "file:///Users/yourusername/src/mp4parse-rust" } `

  1. int dst_stride, int width, int height,

thirdparty/rust/mp4parsecapi and third_party/rust/mp4parse. Confirm the diff is what you expect.

  1. int dst_stride, int width, int height,

make sure to revert.

  1. int dst_stride, int width, int height,

/Users/your_username/src/mp4parse-rust. This can include try runs, but if you make any additional changes, you must be sure to commit them in your local git checkout of mp4parse-rust and re-run mach vendor rust.

This is a more thorough way to test local changes to the rust code since try is available, but it's slower than the path dependency approach above because every change must be committed and copied into the mozilla-central tree with mach vendor rust.