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(schema-engine-wasm): stable skeleton + playground #5111

Merged
merged 7 commits into from
Jan 13, 2025

Conversation

jkomyno
Copy link
Contributor

@jkomyno jkomyno commented Jan 9, 2025

This PR:

@jkomyno jkomyno added this to the 6.3.0 milestone Jan 9, 2025
@jkomyno jkomyno self-assigned this Jan 9, 2025
@jkomyno jkomyno requested a review from a team as a code owner January 9, 2025 14:44
@jkomyno jkomyno requested review from FGoessler and removed request for a team January 9, 2025 14:44
Copy link

codspeed-hq bot commented Jan 9, 2025

CodSpeed Performance Report

Merging #5111 will not alter performance

Comparing feat/schema-engine-wasm-init (9948b53) with main (8d21d25)

Summary

✅ 11 untouched benchmarks

Copy link
Contributor

github-actions bot commented Jan 9, 2025

WASM Query Engine file Size

Engine This PR Base branch Diff
Postgres 2.098MiB 2.097MiB 1.223KiB
Postgres (gzip) 843.463KiB 841.797KiB 1.667KiB
Mysql 2.059MiB 2.058MiB 1.243KiB
Mysql (gzip) 829.008KiB 828.072KiB 959.000B
Sqlite 1.974MiB 1.973MiB 1.243KiB
Sqlite (gzip) 793.512KiB 792.802KiB 727.000B

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: delete once somebody reviews this PR.


console.log('[adapter]', adapter)

// TODO: use `engine`.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: TODOs in the TypeScript files changed/introduced by this PR are supposed to be tackled in later PRs.
For now, they act as informative comments only.

Comment on lines +4 to +5
# Note: this script started as a copy of the `query-engine-wasm`'s `build.sh` script, but will likely diverge over time.
# For this reason, we're avoiding premature refactoring and keeping the two scripts separate.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Callout ^

Comment on lines +53 to +58
#[derive(Deserialize, Tsify)]
#[tsify(from_wasm_abi)]
pub struct SchemaEngineParams {
// TODO: support multiple datamodels
datamodel: String,
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without tsify::Tsify, this Rust struct would be converted into a (useless) class instance with related class checks.
It's much more ergonomic to pass un-named JS objects as the SchemaEngine's constructor input arguments instead.

@jkomyno jkomyno requested review from jacek-prisma and removed request for FGoessler January 10, 2025 14:13
@jkomyno jkomyno merged commit 814e8ba into main Jan 13, 2025
23 checks passed
@jkomyno jkomyno deleted the feat/schema-engine-wasm-init branch January 13, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants