Comments (10)
A possible alternative.
Use an ignored local-gir
directory and a gir.txt
with commit hashes. The makefile would know how to
mkdir local-gir; git clone $GIR_URL local-gir/gir; git clone $GIR_FILES_URL local-gir/gir-files
if they're absent but not clobber existing ones- check out the commits set in
gir.txt
(basically whatgit submodule update
does)
You could either let make gir
do the default thing or symlink local-gir
somewhere and it would only check out the necessary commits if asked to (e.g. make reset-gir
) or just build run the existing gir
it finds.
from gtk3-rs.
Other alternative: optionally make gir/target
symlink to base gir/target
, may be ever add make target to do that.
from gtk3-rs.
Something like this can be achieved with cargo config.
workdir
├── gdk
│ └── gir
├── gtk
│ └── gir
├── .cargo
│ └── config
└── target
Put target-dir = "./target"
in config
to make all crates use the same target directory. Just need to make make
aware of where to find the binary somehow, or rewrite it to use cargo run
.
from gtk3-rs.
Hard making all target
to same directory IMHO not good idea as modules can have different version of gir.
If you think that gir
better be always same then better just add new module with gtk
, gdk
, ..., gir
, gir-files
as sub-modules.
from gtk3-rs.
You'll still have to rebuild gir
when jumping between crates but none of its dependencies (if the lockfiles don't differ). This can be avoided by getting even more creative and using cargo install
to make this independent of where the target
directory is and let each crate have its own gir
binary:
GIR = gir/target/bin/gir
# ...
$(GIR) : gir/Cargo.toml gir/Cargo.lock gir/build.rs $(shell find gir/src -name '*.rs')
# This line can be removed once we have `cargo install --force`
cargo uninstall --root gir/target gir 2&>1 > /dev/null || true
cargo install --root gir/target --path gir
from gtk3-rs.
I not understand how cargo install be better.
PS. We need full rebuild gir
on update local rustc version (every 6 week).
from gtk3-rs.
I'll probably add a PR to make the install idea easier to understand. As to rustc upgrades the benefit of static linking by default is gir
the binary isn't dependent on libstd-blahblah.so
, you don't need to rebuild it just because rustc is upgraded.
from gtk3-rs.
Yes, it static linked, so when we try build gir
under new rustc
it do full rebuild as std
version changed.
from gtk3-rs.
Last only true if not using make
.
from gtk3-rs.
We don't have them per module any more as everything's merged into one.
from gtk3-rs.
Related Issues (20)
- Unexpected plug-added event for socket realized HOT 2
- could not find system library 'gio-2.0' required by the 'gio-sys' crate HOT 6
- [BUG] Wrong return turn (u32 vs gint) for GtkNotebook append_page HOT 3
- Update to wayland-client 0.30
- [HELP] Using GTK_STOCK_REMOVE HOT 2
- the procedure entry point _divmoddi4 could not be located in the dynamic link library D:\msys32\mingw32\bin\libglib-2.0-0.dll HOT 1
- [HELP] STATUS_ACCESS_VIOLATION when right clicking an Entry widget HOT 3
- [BUG] gtk fails to compile on mispel HOT 1
- [HELP] What is best way to show error message and then close application on panic?
- Quoting C documentation regarding the use of Rust methods is not helpful HOT 2
- [BUG] Dialog and clipboard examples are dead links
- Gtk::Inhibit has been removed in very recent versions. Documentation says it's still there. HOT 5
- [HELP] How do I get the width and height of the current screen? HOT 3
- [BUG] window.rs has two fn "screen" HOT 2
- [HELP] Clipboard: missing connect_owner_change function?
- [HELP] Make a desktop widget using GTK3 bindings
- [HELP] Why doesn't the merge PRs? HOT 1
- [HELP] Access gtk_sys::GtkWidget from gtk::GtkToggleButton HOT 2
- [BUG] Unexpected lines in `cairo_threads` example running on HiDPI display
- [BUG] The examples don't compile due compilation error on atk v0.19.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gtk3-rs.