bio-rs
Open source Rust/WASM tools for biological AI models.
Python is where many bio-AI models are born. bio-rs is where the tooling around them becomes portable, inspectable, and easier to use from CLIs, browsers, servers, and agents.
bio-rs is starting with small, production-quality building blocks for biological AI model migration. The current release provides a protein FASTA seed module and a portable package manifest that can describe model artifacts, preprocessing, postprocessing, runtime targets, fixtures, and expected outputs.
1.0.0 Goal
bio-rs reaches 1.0.0 when a Python-born biological AI model can be packaged,
inspected, verified against its Python baseline, and executed through portable
runtime surfaces:
- CLI tools
- browser-ready WASM/WebGPU
- server-side Rust usage
- agent-friendly machine-readable interfaces
The long-term goal is not only model format conversion. bio-rs should also make the surrounding bio/chem tooling portable: the practical pieces currently often handled by Python libraries such as BioPython and RDKit.
Performance and cost improvements are benchmark targets, not current claims.
Current Modules
Protein FASTA
The protein FASTA seed module validates protein FASTA input and tokenizes FASTA
records into stable protein-20 token ids.
Package Manifest
The package manifest module describes a portable biological AI model package:
- model artifact format and path
- preprocessing and postprocessing steps
- runtime backend and target
- parity fixtures and expected outputs
biors package inspect emits a compact manifest summary. biors package validate emits a machine-readable validation report and exits non-zero when the
manifest is incomplete.
Current Features
- FASTA parsing for one or more protein sequences
protein-20residue validation- lowercase sequence normalization
- ambiguous residue reporting for
X,B,Z,J,U, andO - invalid residue reporting
- JSON array output from the CLI
- portable model package manifest structs in
biors-core - package manifest inspection and validation from the CLI
Release Path
0.6.0: Portable package manifest inspect/validate.0.7.0: Runtime bridge planning for ONNX/WebGPU package targets.0.8.0: Verification harness for Python-baseline parity fixtures.
Not Yet
bio-rs does not yet provide a full model migration engine, a browser AlphaFold runtime, or a Rust replacement for all BioPython/RDKit functionality. Those are the milestones this repository is moving toward.
Quickstart
Inspect FASTA records:
Tokenize FASTA records:
Tokenize FASTA records from stdin:
|
Tokenize a multi-record FASTA file:
Inspect a portable model package manifest:
Validate a portable model package manifest:
Use the Rust library:
use ;
let tokenized = tokenize_fasta_records?;
let summary = summarize_tokenized_proteins;
assert_eq!;
assert_eq!;
# Ok::
JSON Contracts
tokenize always emits an array of records:
inspect always emits a summary object:
package inspect always emits a manifest summary object:
package validate always emits a validation report:
Checks
The check suite runs cargo fmt, native Rust checks, a biors-core
wasm32-unknown-unknown build check, tests, and cargo clippy with warnings
denied.
Run the Rust library example:
Workspace
packages/
rust/
biors/ CLI
biors-core/ FASTA parsing, tokenization, and package contracts
examples/
multi.fasta
protein-package/
protein.fasta
Protein-20
A C D E F G H I K L M N P Q R S T V W Y
Token ids follow that order, starting at 0.
License
Dual licensed under MIT OR Apache-2.0.