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: refactor the Kotlin wrapper and hide the generated uniffi api [WPB-14473] #777

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

typfel
Copy link
Member

@typfel typfel commented Nov 22, 2024

What's new in this PR


PR Submission Checklist for internal contributors
  • The PR Title
    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

The Kotlin wrapper was at some point imported from the Kalium but for us
it makes more sense to align all our wrapper to have a similar structure.
By moving the code into its own library we can control the visibility by importing
it into our public facing library as an implementation dependency. This makes
our wrapper API the only visible API to the library consumer.
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.81%. Comparing base (9c67569) to head (24383f7).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #777      +/-   ##
==========================================
+ Coverage   71.79%   71.81%   +0.01%     
==========================================
  Files         107      107              
  Lines       19819    19840      +21     
==========================================
+ Hits        14230    14249      +19     
- Misses       5589     5591       +2     

see 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c67569...24383f7. Read the comment docs.

---- 🚨 Try these New Features:

Copy link

🐰 Bencher Report

Branchrefactor/kotlin-wrapper
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencynanoseconds (ns)
Commit add f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
18,535,000.00
Commit add f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
6,760,400.00
Commit add f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
9,262,500.00
Commit add f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
11,656,000.00
Commit add f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
14,441,000.00
Commit add f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
16,319,000.00
Commit add f(number clients)/cs1/mem/1002📈 view plot
🚷 view threshold
979,750,000.00
Commit add f(number clients)/cs1/mem/2📈 view plot
🚷 view threshold
6,692,500.00
Commit add f(number clients)/cs1/mem/202📈 view plot
🚷 view threshold
83,595,000.00
Commit add f(number clients)/cs1/mem/402📈 view plot
🚷 view threshold
218,030,000.00
Commit add f(number clients)/cs1/mem/602📈 view plot
🚷 view threshold
421,190,000.00
Commit add f(number clients)/cs1/mem/802📈 view plot
🚷 view threshold
669,610,000.00
Commit pending proposals f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
115,150,000.00
Commit pending proposals f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
28,120,000.00
Commit pending proposals f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
45,696,000.00
Commit pending proposals f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
60,694,000.00
Commit pending proposals f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
78,992,000.00
Commit pending proposals f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
94,541,000.00
Commit pending proposals f(pending size)/cs1/mem/1📈 view plot
🚷 view threshold
18,256,000.00
Commit pending proposals f(pending size)/cs1/mem/101📈 view plot
🚷 view threshold
115,270,000.00
Commit pending proposals f(pending size)/cs1/mem/21📈 view plot
🚷 view threshold
35,509,000.00
Commit pending proposals f(pending size)/cs1/mem/41📈 view plot
🚷 view threshold
56,307,000.00
Commit pending proposals f(pending size)/cs1/mem/61📈 view plot
🚷 view threshold
75,046,000.00
Commit pending proposals f(pending size)/cs1/mem/81📈 view plot
🚷 view threshold
94,826,000.00
Commit remove f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
27,395,000.00
Commit remove f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
6,598,400.00
Commit remove f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
8,878,500.00
Commit remove f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
11,974,000.00
Commit remove f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
17,391,000.00
Commit remove f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
22,146,000.00
Commit remove f(number clients)/cs1/mem/1002📈 view plot
🚷 view threshold
29,957,000.00
Commit remove f(number clients)/cs1/mem/2📈 view plot
🚷 view threshold
137,130,000.00
Commit remove f(number clients)/cs1/mem/202📈 view plot
🚷 view threshold
115,050,000.00
Commit remove f(number clients)/cs1/mem/402📈 view plot
🚷 view threshold
93,792,000.00
Commit remove f(number clients)/cs1/mem/602📈 view plot
🚷 view threshold
72,087,000.00
Commit remove f(number clients)/cs1/mem/802📈 view plot
🚷 view threshold
51,535,000.00
Commit update f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
136,900,000.00
Commit update f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
6,815,000.00
Commit update f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
33,344,000.00
Commit update f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
59,118,000.00
Commit update f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
86,150,000.00
Commit update f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
111,580,000.00
Count KeyPackage/cs1/mem/1002📈 view plot
🚷 view threshold
10,246,000.00
Count KeyPackage/cs1/mem/2📈 view plot
🚷 view threshold
6,492,600.00
Count KeyPackage/cs1/mem/202📈 view plot
🚷 view threshold
7,040,000.00
Count KeyPackage/cs1/mem/402📈 view plot
🚷 view threshold
7,852,200.00
Count KeyPackage/cs1/mem/602📈 view plot
🚷 view threshold
8,649,500.00
Count KeyPackage/cs1/mem/802📈 view plot
🚷 view threshold
9,444,600.00
Create group/cs1/mem📈 view plot
🚷 view threshold
6,620,300.00
Decrypt f(msg size)/cs1/mem/10📈 view plot
🚷 view threshold
6,251,800.00
Decrypt f(msg size)/cs1/mem/10010📈 view plot
🚷 view threshold
6,343,900.00
Decrypt f(msg size)/cs1/mem/2010📈 view plot
🚷 view threshold
6,295,100.00
Decrypt f(msg size)/cs1/mem/4010📈 view plot
🚷 view threshold
6,463,000.00
Decrypt f(msg size)/cs1/mem/6010📈 view plot
🚷 view threshold
6,372,200.00
Decrypt f(msg size)/cs1/mem/8010📈 view plot
🚷 view threshold
6,429,800.00
Encrypt f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
8,907,200.00
Encrypt f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
6,257,800.00
Encrypt f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
6,864,300.00
Encrypt f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
7,552,100.00
Encrypt f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
8,010,700.00
Encrypt f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
8,371,100.00
Encrypt f(msg size)/cs1/mem/10📈 view plot
🚷 view threshold
8,557,600.00
Encrypt f(msg size)/cs1/mem/10010📈 view plot
🚷 view threshold
8,955,000.00
Encrypt f(msg size)/cs1/mem/2010📈 view plot
🚷 view threshold
8,637,300.00
Encrypt f(msg size)/cs1/mem/4010📈 view plot
🚷 view threshold
8,655,800.00
Encrypt f(msg size)/cs1/mem/6010📈 view plot
🚷 view threshold
8,704,900.00
Encrypt f(msg size)/cs1/mem/8010📈 view plot
🚷 view threshold
8,713,200.00
Generate KeyPackage f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
241,790,000.00
Generate KeyPackage f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
6,465,000.00
Generate KeyPackage f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
33,008,000.00
Generate KeyPackage f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
85,430,000.00
Generate KeyPackage f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
137,010,000.00
Generate KeyPackage f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
188,620,000.00
Join from external commit f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
244,570,000.00
Join from external commit f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
7,474,400.00
Join from external commit f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
54,928,000.00
Join from external commit f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
102,280,000.00
Join from external commit f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
149,870,000.00
Join from external commit f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
196,030,000.00
Join from welcome f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
113,920,000.00
Join from welcome f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
7,002,500.00
Join from welcome f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
28,748,000.00
Join from welcome f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
50,446,000.00
Join from welcome f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
71,579,000.00
Join from welcome f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
93,464,000.00
Mls vs Proteus: add/MLS/mem/1📈 view plot
🚷 view threshold
6,760,800.00
Mls vs Proteus: add/MLS/mem/101📈 view plot
🚷 view threshold
8,018,100.00
Mls vs Proteus: add/MLS/mem/21📈 view plot
🚷 view threshold
6,951,800.00
Mls vs Proteus: add/MLS/mem/41📈 view plot
🚷 view threshold
7,373,400.00
Mls vs Proteus: add/MLS/mem/61📈 view plot
🚷 view threshold
7,500,400.00
Mls vs Proteus: add/MLS/mem/81📈 view plot
🚷 view threshold
7,781,200.00
Mls vs Proteus: add/Proteus/mem/1📈 view plot
🚷 view threshold
6,350,500.00
Mls vs Proteus: add/Proteus/mem/101📈 view plot
🚷 view threshold
45,004,000.00
Mls vs Proteus: add/Proteus/mem/21📈 view plot
🚷 view threshold
14,104,000.00
Mls vs Proteus: add/Proteus/mem/41📈 view plot
🚷 view threshold
22,405,000.00
Mls vs Proteus: add/Proteus/mem/61📈 view plot
🚷 view threshold
29,506,000.00
Mls vs Proteus: add/Proteus/mem/81📈 view plot
🚷 view threshold
37,155,000.00
Mls vs Proteus: encrypt/MLS/mem/1📈 view plot
🚷 view threshold
6,151,000.00
Mls vs Proteus: encrypt/MLS/mem/101📈 view plot
🚷 view threshold
6,702,000.00
Mls vs Proteus: encrypt/MLS/mem/21📈 view plot
🚷 view threshold
6,392,300.00
Mls vs Proteus: encrypt/MLS/mem/41📈 view plot
🚷 view threshold
6,519,100.00
Mls vs Proteus: encrypt/MLS/mem/61📈 view plot
🚷 view threshold
6,682,200.00
Mls vs Proteus: encrypt/MLS/mem/81📈 view plot
🚷 view threshold
6,707,500.00
Mls vs Proteus: encrypt/Proteus/mem/1📈 view plot
🚷 view threshold
6,025,600.00
Mls vs Proteus: encrypt/Proteus/mem/101📈 view plot
🚷 view threshold
16,227,000.00
Mls vs Proteus: encrypt/Proteus/mem/21📈 view plot
🚷 view threshold
8,149,800.00
Mls vs Proteus: encrypt/Proteus/mem/41📈 view plot
🚷 view threshold
10,323,000.00
Mls vs Proteus: encrypt/Proteus/mem/61📈 view plot
🚷 view threshold
12,146,000.00
Mls vs Proteus: encrypt/Proteus/mem/81📈 view plot
🚷 view threshold
14,107,000.00
Mls vs Proteus: remove/MLS/mem/1📈 view plot
🚷 view threshold
20,121,000.00
Mls vs Proteus: remove/MLS/mem/101📈 view plot
🚷 view threshold
8,230,200.00
Mls vs Proteus: remove/MLS/mem/21📈 view plot
🚷 view threshold
17,614,000.00
Mls vs Proteus: remove/MLS/mem/41📈 view plot
🚷 view threshold
15,185,000.00
Mls vs Proteus: remove/MLS/mem/61📈 view plot
🚷 view threshold
12,974,000.00
Mls vs Proteus: remove/MLS/mem/81📈 view plot
🚷 view threshold
10,559,000.00
Mls vs Proteus: remove/Proteus/mem/1📈 view plot
🚷 view threshold
5,935,600.00
Mls vs Proteus: remove/Proteus/mem/101📈 view plot
🚷 view threshold
7,345,500.00
Mls vs Proteus: remove/Proteus/mem/21📈 view plot
🚷 view threshold
6,296,800.00
Mls vs Proteus: remove/Proteus/mem/41📈 view plot
🚷 view threshold
6,423,000.00
Mls vs Proteus: remove/Proteus/mem/61📈 view plot
🚷 view threshold
6,913,500.00
Mls vs Proteus: remove/Proteus/mem/81📈 view plot
🚷 view threshold
6,830,700.00
Mls vs Proteus: update/MLS/mem/1📈 view plot
🚷 view threshold
6,767,100.00
Mls vs Proteus: update/MLS/mem/101📈 view plot
🚷 view threshold
20,263,000.00
Mls vs Proteus: update/MLS/mem/21📈 view plot
🚷 view threshold
9,580,200.00
Mls vs Proteus: update/MLS/mem/41📈 view plot
🚷 view threshold
12,302,000.00
Mls vs Proteus: update/MLS/mem/61📈 view plot
🚷 view threshold
15,037,000.00
Mls vs Proteus: update/MLS/mem/81📈 view plot
🚷 view threshold
17,807,000.00
Mls vs Proteus: update/Proteus/mem/1📈 view plot
🚷 view threshold
6,413,300.00
Mls vs Proteus: update/Proteus/mem/101📈 view plot
🚷 view threshold
46,758,000.00
Mls vs Proteus: update/Proteus/mem/21📈 view plot
🚷 view threshold
14,709,000.00
Mls vs Proteus: update/Proteus/mem/41📈 view plot
🚷 view threshold
22,420,000.00
Mls vs Proteus: update/Proteus/mem/61📈 view plot
🚷 view threshold
30,531,000.00
Mls vs Proteus: update/Proteus/mem/81📈 view plot
🚷 view threshold
38,646,000.00
🐰 View full continuous benchmarking report in Bencher

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