Consider providing an option for dynamic linking
- Lingua principale
- Rust
- Stelle
- 9.3k
- Fork
- 2.4k
- Merge medio
- 3g 11h
- PR unite (30g)
- 360
Descrizione
### Is your feature request related to a problem or challenge?
`datafusion` is a "swiss army knife" kind of library - it's large and developing against it means **~13 second link times** every time you re-run tests, even with modern linkers like `mold`.
I recently tried the approach described in [this blog post](https://robert.kra.hn/posts/2022-09-09-speeding-up-incremental-rust-compilation-with-dylibs/) - wrapping `datafusion` into a dynamic library. This reduced my incremental test build times by ~10 seconds!
### Describe the solution you'd like
Bevy project (also a very large library) now [offer a feature flag](https://bevyengine.org/learn/book/getting-started/setup/#enable-fast-compiles-optional) to link it dynamically.
Specifying `crate-type = ["rlib", "dylib"]` might also be enough to let users easily link `datafusion` dynamically in their `dev` builds using `RUSTFLAGS="-C prefer-dynamic"`.
It may iterations speeds for `datafusion`'s own development.
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Non viene indicato alcun file sorgente né alcun test. Inizia esaminando i manifest Cargo e la configurazione di build di sviluppo del repository, quindi prova crate-type = ["rlib", "dylib"] con RUSTFLAGS="-C prefer-dynamic" per DataFusion e i suoi test; il lavoro è completato quando il linking dinamico è disponibile senza compromettere le build normali.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- build-system, developer-experience
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100