Skip to content

Commit

Permalink
refactor(WR): Decouple Wint/WR
Browse files Browse the repository at this point in the history
feat(WR): add ttf_parser font caching
  • Loading branch information
declantsien committed Feb 26, 2023
1 parent dae7cc7 commit 5f42443
Show file tree
Hide file tree
Showing 74 changed files with 5,342 additions and 2,379 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
bin_version=$version.webrender
echo "version=$version" >> $GITHUB_ENV
echo "bin_version=$bin_version" >> $GITHUB_ENV
./build_emacs_ng.sh $bin_version --with-webrender
./build_emacs_ng.sh $bin_version --with-webrender --with-winit
- name: Reduce cache
continue-on-error: true
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ jobs:
- name: configure(webrender)
if: ${{ matrix.build == 'webrender' }}
run: |
./configure --enable-checking=glyphs --enable-rust-debug --with-webrender
./configure --enable-checking=glyphs --enable-rust-debug --with-webrender --with-winit
- name: build
run: |
Expand Down
65 changes: 50 additions & 15 deletions Cargo.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,28 @@ lsp_json = { version = "0.1.0", path = "rust_src/crates/lsp_json" }
git = { version = "0.1.0", path = "rust_src/crates/git", optional = true }
ng_module = { version = "0.1.0", path = "rust_src/crates/ng_module", optional = true }
js = { version = "0.1.0", path = "rust_src/crates/js", optional = true }
wrterm = { version = "0.1.0", path = "rust_src/crates/webrender", optional = true }
clippy = { version = "*", optional = true }
log = "0.4.17"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["matchers", "regex", "once_cell", "tracing", "std", "thread_local", "env-filter"] }

[dependencies.tracing-subscriber]
version = "0.3"
features = [
"matchers",
"regex",
"once_cell",
"tracing",
"std",
"thread_local",
"env-filter"
]

[dependencies.wrterm]
version = "0.1.0"
path = "rust_src/crates/webrender"
default-features = false
optional = true


[build-dependencies]
ng-bindgen = { path = "rust_src/ng-bindgen" }
Expand All @@ -60,40 +77,58 @@ use-xml2 = []
# Use a window system
window-system = ["emacs/window-system"]
# Use the x11 window system
window-system-x11 = []
window-system-x11 = ["window-system"]
# Use the nextstep window system
window-system-nextstep = []
window-system-nextstep = ["window-system"]
# Use the w32 window system
window-system-w32 = []
window-system-w32 = ["window-system"]
# Use the haiku window system
window-system-haiku = ["window-system"]
# Use the pgtk window system
window-system-pgtk = ["window-system"]
# Build with git2rs support
libgit = ["git", "ng-bindgen/libgit"]
# Use the webrender window system
webrender = ["dep:wrterm"]
window-system-webrender = ["ng-bindgen/window-system-webrender", "webrender"]
# Use the webrender
webrender = [
"ng-bindgen/webrender",
"wrterm",
"wrterm/std",
"wrterm/wayland",
@WEBRENDER_EXTRA_FEATURES@
]
# Use the winit window system
window-system-winit = [
"window-system",
"webrender",
"emacs/window-system-winit",
]
# Treat warnings as a build error on Travis.
strict = []
# Use JavaScript and Deno
javascript = ["dep:js", "ng-bindgen/javascript"]
# Build with dynamic modules support's extensions.
ng-module = ["dep:ng_module", "ng-bindgen/ng-module"]
# Enable glyphs debugging code.
glyph-debug = []
glyph-debug = ["wrterm?/capture"]

### Patches

# tmp ignore macOS alternative key characters.
[patch.crates-io.winit]
git = "https://github.com/declantsien/winit"
rev="716cceb53fa04dd47ca16a34ee5df07f72da1a2d"
# [patch.crates-io.winit]
# git = "https://github.com/declantsien/winit"
# rev="716cceb53fa04dd47ca16a34ee5df07f72da1a2d"

# fontconfig font dirs patch
[patch.crates-io.font-loader]
git = "https://github.com/declantsien/rust-font-loader.git"
rev = "0a53c767463e13346221ad23fa6dd50cd787cd72"

# raw window handle patch
[patch.crates-io.surfman]
git ="https://github.com/declantsien/surfman.git"
rev = "caddee293e1f6ec8b33caec6170585a89c2674b8"
rev = "258d5bb99c7285e3e1b0946cb8f6f4482067a7ff"

# unreleased 0.7.0
[patch.crates-io.surfman-chains]
git = "https://github.com/declantsien/surfman-chains.git"
rev = "3a244f056147d517ee1ca8a490c89628d1539c90"
git = "https://github.com/servo/surfman-chains.git"
rev = "57cd1e290205a5459969bfe4cf0852d3bfec189c"
Loading

0 comments on commit 5f42443

Please sign in to comment.