Skip to content

Commit

Permalink
Some code refactoring
Browse files Browse the repository at this point in the history
* Cleanup some unused code
* Move common Emacs primitive traits to emacs crate
* Update some names to match Rust conventions
* Decouple font to s separated crates
  • Loading branch information
declantsien committed Feb 26, 2024
1 parent 12860c3 commit 7d1528a
Show file tree
Hide file tree
Showing 81 changed files with 2,150 additions and 2,659 deletions.
51 changes: 36 additions & 15 deletions Cargo.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,29 @@ members = ["rust_src/remacs-lib", "etc/colors", "rust_src/crates/*"]
exclude = ["rust_src/ng-bindgen"]

[workspace.dependencies]
libc = "0.2"
log = "0.4"
errno = "0.3"
gtk = "0.18"
gdk = "0.18"
gtk-sys = "0.18"
gdk-sys = "0.18"
gdkwayland-sys = "0.18"
gdkx11-sys = "0.18"
parking_lot = "0.12"
fxhash = "0.2"
raw-window-handle = "0.5"
image = "0.24"

[workspace.dependencies.webrender]
git = "https://github.com/declantsien/webrender.git"
rev = "1732a483fe19466a4e2834017214ff3e30525f45"
default-features = false

[workspace.dependencies.webrender_api]
git = "https://github.com/declantsien/webrender.git"
rev = "1732a483fe19466a4e2834017214ff3e30525f45"
default-features = false

# Allow unwinding in functions called from C. See
# https://www.reddit.com/r/rust/comments/565q1f/wrote_a_blogpost_from_my_experiences_the_arduous/d8h053m/
Expand Down Expand Up @@ -43,10 +59,12 @@ lisp-macros = { version = "0.1.0", path = "rust_src/crates/lisp_macros" }
ng_async = { version = "0.1.0", path = "rust_src/crates/ng_async" }
lsp_json = { version = "0.1.0", path = "rust_src/crates/lsp_json" }
git = { version = "0.1.0", path = "rust_src/crates/git", optional = true }
font = { version = "0.1.0", path = "rust_src/crates/font", 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 }
winit-term = { version = "0.1.0", path = "rust_src/crates/winit-term", optional = true }
clippy = { version = "*", optional = true }
log = "0.4.17"
log.workspace = true
tracing = "0.1"

[dependencies.tracing-subscriber]
Expand All @@ -61,9 +79,9 @@ features = [
"env-filter"
]

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

Expand All @@ -85,29 +103,32 @@ use-xml2 = []
# Use a window system
window-system = ["emacs/window-system"]
# Use the x11 window system
window-system-x11 = ["window-system"]
window-system-x11 = ["window-system", "emacs/window-system-x11"]
# Use the nextstep window system
window-system-nextstep = ["window-system"]
window-system-nextstep = ["window-system", "emacs/window-system-ns"]
# Use the w32 window system
window-system-w32 = ["window-system"]
window-system-w32 = ["window-system", "emacs/window-system-w32"]
# Use the haiku window system
window-system-haiku = ["window-system"]
window-system-haiku = ["window-system", "emacs/window-system-haiku"]
# Use the pgtk window system
window-system-pgtk = ["window-system", "emacs/window-system-pgtk",]
# Build with git2rs support
libgit = ["git", "ng-bindgen/libgit"]
# Use the webrender
webrender = [
"ng-bindgen/webrender",
"wrterm",
"wrterm/std",
"wrterm/wayland",
gl-renderer = [
"dep:font",
"ng-bindgen/gl-renderer",
"dep:gl-renderer",
"gl-renderer/std",
@WEBRENDER_EXTRA_FEATURES@
]
# Use the winit window system
window-system-winit = [
"dep:winit-term",
"ng-bindgen/window-system-winit",
"window-system",
"webrender",
"gl-renderer",
"gl-renderer/winit",
"emacs/window-system-winit",
]
# Treat warnings as a build error on Travis.
Expand All @@ -117,8 +138,8 @@ 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 = ["wrterm?/capture"]
profiling = ["wrterm?/profiling"]
glyph-debug = ["gl-renderer?/capture"]
profiling = ["gl-renderer?/profiling"]

### Patches

Expand Down
Loading

0 comments on commit 7d1528a

Please sign in to comment.