Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dockerfile and patches for building Chromium with rav1d #519

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

endbr64
Copy link
Contributor

@endbr64 endbr64 commented Oct 12, 2023

docker build -t chromium .

then xhost + on the host (TODO: get .Xauthority to work) and

docker run -it -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw -v "$HOME/.Xauthority:/root/.Xauthority:rw" -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket:rw -v /dev/shm:/dev/shm -e XDG_RUNTIME_DIR=/run/user/$(id -u) --cap-add=SYS_NICE chromium:latest /build/chromium/src/out/Default/chrome --no-sandbox --disable-gpu

or

docker run -it -v /run/user/$(id -u)/wayland-0:/run/user/$(id -u)/wayland-0 -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket -v /dev/shm:/dev/shm -e XDG_RUNTIME_DIR=/run/user/$(id -u) -e WAYLAND_DISPLAY=wayland-0 --cap-add=SYS_NICE chromium:latest /build/chromium/src/out/Default/chrome --no-sandbox --disable-gpu --ozone-platform=wayland

@thedataking
Copy link
Collaborator

thedataking commented Oct 12, 2023

AFAIK, the package dir contains files used to package dav1d. I don't love that we're adding stuff to build and package Chromium here. Wouldn't it be cleaner to contribute these patches to Chromium? Nvm, fine to store the patches in a PR.

Comment on lines +1 to +13
diff --git a/third_party/rust/rav1d/v1/crate/Cargo.toml b/third_party/rust/rav1d/v1/crate/Cargo.toml
--- a/third_party/rust/rav1d/v1/crate/Cargo.toml
+++ b/third_party/rust/rav1d/v1/crate/Cargo.toml
@@ -1,7 +1,7 @@
[workspace]
members = []
[package]
-name = "c2rust_out"
+name = "rav1d"
authors = ["C2Rust"]
-version = "0.0.0"
+version = "1.0.0"
publish = false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part we can just modify in rav1d directly, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we probably should.

@kkysen kkysen mentioned this pull request Oct 12, 2023
kkysen added a commit that referenced this pull request Oct 18, 2023
This just cleans up `Cargo.toml`, which was still mostly generated by
`c2rust transpile`. The package is now named `rav1d` (like the `lib` was
already changed to) and I set the version to `0.2.0` for future
publishing (and so things like #519 don't need to patch it). The
existing `rav1d` crate is at `0.1.0`, and so since we plan on publishing
there, we can start at `0.2.0`. I also fixed some doc comments so `cargo
test` can run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants