Skip to content

Commit

Permalink
feat: flatpak support (#91)
Browse files Browse the repository at this point in the history
* Add flatpak manifest

Known issues:
- MOZJS_ARCHIVE need to link manually
- Mozangle build failed due to stddef.h missing
- script build failed due to missing WebIDL python module

* Fix mozangle and script build errors

* Update README.md

* Update gitignore

* Add libmozjs archive

* Import more granular servo crates

* Fix running error in flatpak

* Enable surfman features on Windows

* Enable mozangle features instead

* build(flatpak): add verso desktop file

---------

Co-authored-by: Wu Yuwei <Wu Yu Wei>
Co-authored-by: Jason Tsai <[email protected]>
  • Loading branch information
wusyong and pewsheen authored Aug 1, 2024
1 parent 74addf1 commit a5bdd6a
Show file tree
Hide file tree
Showing 173 changed files with 35,622 additions and 328 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
resources/* linguist-vendored
third_party/* linguist-vendored
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ Cargo.lock
.DS_Store
.vscode/
resources/
.flatpak-builder/
libmozjs*
cargo-sources.json
184 changes: 27 additions & 157 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 44 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,41 +40,66 @@ targets = [
[features]
default = []
packager = ["dep:cargo-packager-resource-resolver"]
flatpak = []

[build-dependencies]
cfg_aliases = "0.2"

[dependencies]
owo-colors = "4.0"
arboard = "3.4.0"
crossbeam-channel = "0.5"
env_logger = "0.10"
euclid = "0.22"
getopts = "0.2.17"
gleam = "0.15"
ipc-channel = "0.18"
keyboard-types = "0.7"
log = "0.4"
thiserror = "1.0"
raw-window-handle = { version = "0.5", features = ["std"] }
arboard = "3.4.0"
# Servo
libservo = { git = "https://github.com/servo/servo.git", rev = "ed8def2", features = ["max_log_level", "native-bluetooth", "webdriver"] }
sparkle = "0.1.26"
surfman = { version = "0.9", features = ["chains", "sm-raw-window-handle"] }
thiserror = "1.0"
winit = { version = "0.29", features = ["rwh_05"] }
# Servo repo crates
# libservo = { git = "https://github.com/servo/servo.git", rev = "ed8def2", features = ["max_log_level", "native-bluetooth", "webdriver"] }
base = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
bluetooth = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
bluetooth_traits = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
canvas = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
compositing_traits = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
constellation = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
devtools = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
embedder_traits = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
fonts = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
layout_thread_2020 = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
media = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
net = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
profile = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
profile_traits = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
script = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
script_traits = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
servo_config = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
servo_geometry = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
servo_url = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
webdriver_server = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
webrender = { git = "https://github.com/servo/webrender", branch = "0.64", features = ["capture"] }
sparkle = "0.1.26"
webxr = { git = "https://github.com/servo/webxr", features = ["headless"] }
env_logger = "0.10"
webrender_traits = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
webgpu = { git = "https://github.com/servo/servo.git", rev = "ed8def2" }
# Servo org crates
servo-media = { git = "https://github.com/servo/media" }
servo-media-dummy = { git = "https://github.com/servo/media" }
# Servo Compositor
ipc-channel = "0.18"
# Servo
crossbeam-channel = "0.5"
getopts = "0.2.17"
surfman = { version = "0.9", features = ["chains", "sm-raw-window-handle"] }
winit = { version = "0.29", features = ["rwh_05"] }
style = { git = "https://github.com/servo/stylo", branch = "2024-07-16", features = ["servo"] }
style_traits = { git = "https://github.com/servo/stylo", branch = "2024-07-16", features = ["servo"] }
webrender = { git = "https://github.com/servo/webrender", branch = "0.64", features = ["capture"] }
webrender_api = { git = "https://github.com/servo/webrender", branch = "0.64" }
webxr = { git = "https://github.com/servo/webxr", features = ["headless"] }
# Packager feature
cargo-packager-resource-resolver = { version = "0.1.1", features = [
"auto-detect-format",
], optional = true }

[target.'cfg(target_os = "windows")'.dependencies]
libservo = { git = "https://github.com/servo/servo.git", rev = "ed8def2", features = [
"no-wgl",
] }
surfman = { version = "0.9", features = ["sm-angle-default"] }
mozangle = { version = "0.5.1", features = ["egl", "build_dlls"] }

[target.'cfg(any(target_os = "ios", target_os = "macos"))'.dependencies]
block = "0.1"
Expand Down
Loading

0 comments on commit a5bdd6a

Please sign in to comment.