Sera Framework
A native core for plotting, learning, and tabular data.
Sera is the shared architecture behind SeraPlot, SeraML, and the planned SeraDFrame layer. The goal is simple: keep the public API familiar, while moving expensive work into a Rust core that can be reused from Python, JavaScript, and WebAssembly.
Sera is not a separate product that replaces the libraries above it. It is the internal stack that lets each library share the same rendering, algorithm, serialization, and export logic. That keeps the user-facing APIs small while avoiding duplicated implementations between languages.
The framework is designed for documentation, notebooks, local reports, and developer tools where a chart, a model, or a data operation should be fast to produce and easy to ship as a standalone artifact.
| Layer | Responsibility | Typical outputs |
|---|---|---|
| SeraPlot | Chart construction, rendering, export, and interactive document previews. | HTMLSVGWASMDocs |
| SeraML | Native machine-learning algorithms with a familiar fit, predict, and export workflow. | Model stateMetricsONNX |
| SeraDFrame | Planned tabular layer for loading, transforming, and passing data between plotting and ML. | TablesSQL-like opsZero-copy paths |
The language bindings stay close to the conventions users already know. Python code can feel like a plotting or ML library, JavaScript can focus on browser integration, and the shared Rust core remains responsible for the performance-sensitive work.
What Sera optimizes for
- Fast local execution without requiring a service backend.
- Small output files that can be embedded in docs or shared as reports.
- Predictable APIs across Python, JavaScript, Rust, and WebAssembly.
- Clear boundaries between user data, generated artifacts, and optional telemetry.
What stays explicit
- Telemetry remains opt-in and documented separately.
- Native acceleration is used where it helps, without hiding the data flow.
- Benchmarks should be read as implementation signals, not as universal guarantees.
- Experimental surfaces are marked before they become stable API.
The published ratios describe benchmarked paths where the native implementation removes heavy wrapper overhead. Real-world gains depend on data size, chart type, hardware, and export target.
| Comparison | Reported ratio | Interpretation |
|---|---|---|
| SeraPlot vs Plotly | 6 000x | Compact native rendering path for chart generation and export. |
| SeraPlot vs matplotlib | 480x | Lower overhead for common chart construction paths. |
| SeraPlot vs Seaborn | 320x | Less wrapper work before producing the final artifact. |
| SeraML vs sklearn KMeans | 686x | Optimized native loops for iterative workloads. |
| SeraML vs sklearn Random Forest | 28x | Parallel training and scoring potential in tree workloads. |
Sera Framework
Un coeur natif pour les graphiques, le machine learning et les donnees tabulaires.
Sera est l'architecture partagee derriere SeraPlot, SeraML et la future couche SeraDFrame. L'objectif est simple : garder une API familiere, tout en placant le travail couteux dans un coeur Rust reutilisable depuis Python, JavaScript et WebAssembly.
Sera n'est pas un produit separe qui remplace les bibliotheques au-dessus de lui. C'est la pile interne qui permet a chaque bibliotheque de partager le meme rendu, les memes algorithmes, la meme serialisation et les memes exports. L'API reste plus petite, et l'implementation n'est pas dupliquee entre les langages.
Le framework vise les documentations, notebooks, rapports locaux et outils developpeur ou un graphique, un modele ou une operation de donnees doit etre produit rapidement puis partage comme artifact autonome.
| Couche | Responsabilite | Sorties typiques |
|---|---|---|
| SeraPlot | Construction de graphiques, rendu, export et previews interactives dans la documentation. | HTMLSVGWASMDocs |
| SeraML | Algorithmes de machine learning natifs avec un workflow familier fit, predict et export. | Etat modeleMetriquesONNX |
| SeraDFrame | Couche tabulaire prevue pour charger, transformer et faire circuler les donnees entre plotting et ML. | TablesOps SQL-likeZero-copy |
Les bindings restent proches des conventions que les utilisateurs connaissent deja. Python peut ressembler a une bibliotheque de plotting ou de ML, JavaScript peut se concentrer sur l'integration navigateur, et le coeur Rust gere le travail sensible aux performances.
Ce que Sera optimise
- Execution locale rapide sans backend obligatoire.
- Fichiers de sortie compacts, faciles a integrer dans une doc ou un rapport.
- APIs previsibles entre Python, JavaScript, Rust et WebAssembly.
- Frontieres claires entre donnees utilisateur, artifacts generes et telemetry optionnelle.
Ce qui reste explicite
- La telemetry reste opt-in et documentee sur une page separee.
- L'acceleration native est utilisee quand elle aide, sans masquer le flux de donnees.
- Les benchmarks doivent etre lus comme des signaux d'implementation, pas comme des garanties universelles.
- Les surfaces experimentales sont indiquees avant de devenir une API stable.
Les ratios publies decrivent des chemins benchmarkes ou l'implementation native retire beaucoup d'overhead. Les gains reels dependent de la taille des donnees, du type de graphique, du materiel et de la cible d'export.
| Comparaison | Ratio annonce | Lecture conseillee |
|---|---|---|
| SeraPlot vs Plotly | 6 000x | Chemin de rendu natif compact pour generer et exporter les graphiques. |
| SeraPlot vs matplotlib | 480x | Moins d'overhead sur les chemins courants de construction de graphiques. |
| SeraPlot vs Seaborn | 320x | Moins de couches wrapper avant de produire l'artifact final. |
| SeraML vs sklearn KMeans | 686x | Boucles natives optimisees pour les workloads iteratifs. |
| SeraML vs sklearn Random Forest | 28x | Potentiel de parallelisation pour l'entrainement et le scoring des arbres. |