// STRYKE-OFFICE — ENGINEERING REPORT

Opt-in stryke package · cdylib libstryke_office · loaded on use Office · JSON-over-FFI · zero external binaries

>_EXECUTIVE SUMMARY

stryke-office is an opt-in package giving stryke native read+write across the office document landscape — Microsoft OOXML (xlsx/docx/pptx), OpenDocument (ods/odt/odp), PDF, and a full PIL-style raster image surface — with no LibreOffice/soffice subprocess.

Every format maps to a vendored Rust crate statically linked into the cdylib, so the artifact is self-contained: scp it and it runs.

Office
use namespace
opt-in
Tier 2
465
public functions
5+img
document families
0
external binaries
426
Rust tests
21
doc / readme gates
v0.18.0
release

~FORMAT → CRATE

Every format maps to a vendored, statically-linked Rust crate. There is no soffice / LibreOffice / pandoc / zint / ImageMagick subprocess anywhere in the chain.

ConcernImplementation
spreadsheet read (xlsx / xls)calamine (pure Rust)
spreadsheet read (ods)native zip + quick-xml (calamine's ODS parser rejects pretty-printed content.xml)
xlsx writerust_xlsxwriter
ods / odt / odp writelo_odf (OpenDocument serializers)
docx writedocx-rs
docx / odt / pptx / odp readnative zip + quick-xml paragraph + structure extraction
pptx writenative zip + hand-built OOXML part set
pdf read + writelo_core (self-contained, no font files)
pdf merge / split / rotate / info / encrypt / decrypt / compresslopdf (pure-Rust core, default-features = false)
image read + write (all formats)image
image drawing (shapes)imageproc
image text drawingab_glyph + vendored assets/DejaVuSans.ttf
QR-code generationqrcode (matrix only)
1D barcode generationbarcoders (default-features = false, std)

@FUNCTION FAMILIES

The Office namespace exposes 465 public functions. Each maps to a JSON-in/JSON-out export in the cdylib; the stryke wrapper (lib/Office.stk) serializes arguments and decodes responses.

FamilyCountSurface
sheet_*175read/write + a dataframe-style analytics layer (group-by, pivot, join, stats, time-series, finance, sampling, type-coercion, export to csv/json/sql/latex/html)
img_*111PIL-complete handle-based image surface — open/save/convert, resize/crop/rotate, draw, filters, color science, distortions, animation, byte I/O
pdf_*47build/merge/split/rotate, encrypt/decrypt, forms, outline/bookmarks, annotations, attachments, stamps, search, stats
doc_*30read/write, structured blocks, tables, links, stats, readability, summary, diff, convert (md/html/pdf/slides/sheet)
slides_*26read/write, add image/text/notes, reorder, merge, stats, convert (doc/pdf/md/html/sheet)
text_*20plain-text toolkit — grep/sort/uniq/sed/cut/wrap/tr/paste/comm/join/shuf/base64/hash/redact/template
range_* / a1_* / r1c1_* / parse_* / *_to_*20A1 / R1C1 / range math — no workbook opened
chart_*5render/svg/save/from_sheet/grid — 60+ chart types, raster + vector
barcode_*4QR + 1D (code128/39/93/11, codabar, ean13/8, upca, itf, std2of5) → image handle
md_* / html_* / csv_* / *_to_sheet~15cross-format converters between csv/md/html/xml/json/ndjson and sheets/docs
meta_* / color_* / extract_images / mail_merge / info~10document metadata read/write/strip, color science, media extraction, mail-merge, universal file inspector

$ARCHITECTURE

LayerDetail
stryke librarylib/Office.stk — 465 Office::* wrappers that serialize args to JSON, decode responses, map {error} to die
cdyliblibstryke_office.{dylib,so} — 465 office__* JSON-in/out exports, catch_unwind at the boundary, stryke_free_cstring for the return buffer
dispatchformat chosen from the path extension (override via format); reader/writer selected per kind
image handlesimage ops return a numeric handle into an in-process table — open once, transform many times, then img_save / img_close (PIL-style)
buildCargo cdylib, all deps pure Rust — no cmake, no system libraries, no soffice
tests426 Rust round-trip + contract tests (write then read back over a temp file) + a stryke assertion suite in t/ + 21 docs/readme lint gates in tests/
CI.github/workflows/ci.yml — fmt + clippy -D warnings + test on Linux/macOS, doc, release matrix

/SCOPE & LIMITS

v0.18.0 covers structured read + write across the office document landscape plus PDF text generation, a dataframe-style spreadsheet analytics layer, a PIL-complete image surface, native chart rendering (raster + SVG), barcodes/QR, and cross-format conversion. The deliberate limit of the no-external-binary rule: there is no generic render-conversion (docx→pdf laid out like Word, xlsx→pdf), which fundamentally requires a layout/render engine. Conversions are intra-model (e.g. xlsx→ods via the shared cell model) and PDF is generated from a content model, not rasterized from a Word document.

Two further documented limitations — both crate limits, not faked: ODF (ods/odt) and PDF are written unstyled because the lo_odf / lo_core serializers do not expose per-run styling; and spreadsheet formula strings read back via formulas => 1 but are not evaluated (values are whatever the writing app computed). See the project Roadmap for the in-flight items (PowerPoint speaker-notes write, ODF per-run styling, legacy xls write).


$SOURCE MAP

FileRole
src/lib.rsoffice__* exports + spreadsheet / doc / slides / pdf handlers
src/tests.rs426 Rust round-trip + contract tests
src/doc_formats.rscsv/tsv + html/md/rtf/txt readers + writers
src/doc_struct.rsstructured document reads (tables, blocks, links, stats) + merge/convert
src/pptx_write.rsminimal OOXML PowerPoint writer
src/image_ops.rsPIL-complete image I/O + manipulation
src/chart_render.rsraster chart renderer (all chart types)
src/chart_svg.rsvector (SVG / PDF) chart renderer
src/barcode.rsQR + 1D barcode generation
src/meta_ops.rsdocument metadata read / write (OOXML / ODF / PDF)
src/extract.rsembedded media extraction (→ image handles)
src/textops.rstemplate text search/replace (run-coalescing)
src/pdf_build.rsmulti-element paginated PDF document builder
src/pdf_ops.rsPDF merge/split/rotate/info/encrypt/decrypt/compress (lopdf)
src/pdf_attach.rs / pdf_form.rs / pdf_outline.rsPDF attachments, AcroForm fill, outline/bookmarks (lopdf)
lib/Office.stkstryke wrapper (use Office) — 465 functions

#PROJECT METADATA

ItemValue
LicenseMIT
AuthorMenkeTechnologies
Repositorygithub.com/MenkeTechnologies/stryke-office
Parent languagestrykelang
Meta umbrellaMenkeTechnologiesMeta