Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(driver-adapters): enable Wasm on sql-query-connector #4444

Merged
merged 33 commits into from
Nov 17, 2023

Conversation

jkomyno
Copy link
Contributor

@jkomyno jkomyno commented Nov 14, 2023

This PR closes https://github.com/prisma/team-orm/issues/283, and depends on #4442.

@jkomyno jkomyno self-assigned this Nov 14, 2023
Comment on lines +23 to +31
#[cfg(target_arch = "wasm32")]
macro_rules! trace {
(target: $target:expr, $($arg:tt)+) => {{
// No-op in WebAssembly
}};
($($arg:tt)+) => {{
// No-op in WebAssembly
}};
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trace! macro for wasm32-*

Comment on lines +33 to +41
#[cfg(not(target_arch = "wasm32"))]
macro_rules! trace {
(target: $target:expr, $($arg:tt)+) => {
tracing::log::trace!(target: $target, $($arg)+);
};
($($arg:tt)+) => {
tracing::log::trace!($($arg)+);
};
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trace! macro for native compilation.

Copy link

codspeed-hq bot commented Nov 14, 2023

CodSpeed Performance Report

Merging #4444 will degrade performances by 5.92%

Comparing feat/sql-query-connector-on-wasm32-unknown-unknown (e79cb1f) with main (aaed047)

Summary

❌ 1 regressions
✅ 10 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main feat/sql-query-connector-on-wasm32-unknown-unknown Change
large_read 7.2 ms 7.6 ms -5.92%

…github.com:prisma/prisma-engines into feat/sql-query-connector-on-wasm32-unknown-unknown
@jkomyno jkomyno marked this pull request as ready for review November 14, 2023 20:02
@jkomyno jkomyno requested a review from a team as a code owner November 15, 2023 16:26
@jkomyno jkomyno requested review from miguelff and Druue and removed request for a team November 15, 2023 16:26
@jkomyno jkomyno added this to the 5.7.0 milestone Nov 15, 2023
Copy link
Contributor

@miguelff miguelff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look correct and reasonably tidy.

tracing = "0.1"
tracing-futures = "0.2"
uuid.workspace = true
opentelemetry = { version = "0.17", features = ["tokio"] }
tracing-opentelemetry = "0.17.3"
quaint.workspace = true
quaint = { path = "../../../quaint" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these to prevent feature unification?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I spotted a problem while running the CI for request-handlers.
I'm cherry-picking 96cd8ca here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This indeed fixed the CI tests)

Base automatically changed from feat/quaint-on-wasm32-unknown-unknown to main November 17, 2023 15:22
@jkomyno jkomyno merged commit efbc865 into main Nov 17, 2023
52 of 54 checks passed
@jkomyno jkomyno deleted the feat/sql-query-connector-on-wasm32-unknown-unknown branch November 17, 2023 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants