qe: Capabilities-based size optimizations for WASM engine (#4701)
* qe: Capabilities-based size optimizations for WASM engine
Core feature of this PR: `can_have_capability` function in `psl-core`
crate. For multi-connector builds it always returns `true` and has no
effect. If we are inside of a single connector build, however, it will
eveluate value based on the actual connector capabilities. In many
cases, this will allow optimizer to completely eliminate following code
if connector does not support specific feature.
Notable exeception to that were relation joins: for some reason,
optimizer can not eliminate those functions from SQLite bundle. So, this
is the only place in sql-query-connector where we have to introduce
conditionally compiled feature.
In order to take maximum advantage of this functionality, we have to
disable default features in `quaint` and `psl` crates and enable them
only in native engines.
Close prisma/team-orm#928
* Fix tests & lints
* Fix migrate tests
* Fix codspeed
* Now for real
* FFS
* Address some of the feedback
* Introduce reachble_only_with_capability macro
* Compile `returning` uncoditionally
* Restore benchmarks
* Fix benchmarks, but preserve all size gains
* Sigh