Skip to content

Modification of sketchlib.rust to integrate wasm32-unknown-unknown target compilation and other improvements - #62

Merged
johnlees merged 26 commits into
bacpop:mainfrom
vrbouza:main
Jan 29, 2026
Merged

johnlees merged 26 commits into
bacpop:mainfrom
vrbouza:main

Conversation

@vrbouza

@vrbouza vrbouza commented Jan 9, 2026

Copy link
Copy Markdown
Collaborator

These changes allow to compile to wasm32-unknown-unknown. They essentially add conditional compilation attributes, as well as few new files needed for it.

Also I've made that multiple files can now be processed in sketchlib.rust, and there is also the possibility of adding random metadata when creating inverted indexes.

@vrbouza vrbouza self-assigned this Jan 9, 2026
@vrbouza vrbouza added enhancement New feature or request functionality adding a new feature labels Jan 9, 2026
@codecov

codecov Bot commented Jan 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.26923% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.36%. Comparing base (9d2690a) to head (45e2d73).
⚠️ Report is 27 commits behind head on main.

Files with missing lines Patch % Lines
src/hashing/aahash_iterator.rs 67.85% 9 Missing ⚠️
src/io.rs 93.61% 3 Missing ⚠️
src/sketch/mod.rs 92.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #62      +/-   ##
==========================================
+ Coverage   85.91%   91.36%   +5.45%     
==========================================
  Files          17       17              
  Lines        2591     2675      +84     
==========================================
+ Hits         2226     2444     +218     
+ Misses        365      231     -134     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vrbouza
vrbouza marked this pull request as ready for review January 22, 2026 17:40
@vrbouza
vrbouza requested a review from johnlees January 22, 2026 18:25

@johnlees johnlees left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, a few changes I've suggested

Also check cargo fmt and cargo clippy

@@ -0,0 +1,24 @@
name: Cargo Build & Test for the wasm32-unknown-unknown target

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Need to make sure this has run ok

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Will check/test with act, to see if it's possible to do it that way ( https://github.com/nektos/act#runners )

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Managed to do it in the workstation, ciwasm.yml works (though I had to add a rustup uninstall stable/nightly/beta and reinstall to make it work with the local images (github images are not public apparently and there are small differences...). It works! Should we add a clippy for wasm32 as well?

Comment thread src/fastx_wasm.rs
Comment on lines +1 to +2
//! Library that allows for parsing fasta and fastq files for working in a
//! WebAssembly environment.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perhaps this file could go in a wasm subdirectory

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The same as for ska, good for me, but I understand that only these exclusive wasm files, right? Not the wasm adaptations of all functions/structs

Comment thread src/hashing/nthash_iterator.rs Resolved
Comment thread src/hashing/nthash_iterator.rs Resolved
Comment thread src/inverted.rs Resolved
Comment thread src/io.rs Resolved
Comment thread src/io.rs Resolved
Comment thread src/io.rs Resolved
Comment thread src/io.rs Resolved
Comment thread src/sketch/mod.rs Resolved
@vrbouza

vrbouza commented Jan 29, 2026

Copy link
Copy Markdown
Collaborator Author

I think we're now ready to merge (I can't hehe) @johnlees

@johnlees
johnlees merged commit 81d5f0b into bacpop:main Jan 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request functionality adding a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants