181 Commits
Author SHA1 Message Date
Dylan M. Taylor 69dc6f3097 eps: delegate AI editing-data lexer to craft_eps::ai_lex (craft-libs#790) (#9037) 2026-11-21 15:24:11 -05:00
Dylan M. Taylor f72c56711a doc: share PNG pHYs chunk writing via craft-image-codecs (craft-libs#785) (#9033) 2026-11-21 14:16:05 -05:00
BFlat e33f3d3f7c Merge pull request #8901 from dotCooCoo/feat/plugin-wasm-features 2026-11-21 09:07:52 +07:00
Dylan M. TayloranddotCooCoo 82d5aabeec refactor(cdr): use shared craft-cdr from craft-libs (#8857)
* refactor(cdr): depend on shared craft-cdr from craft-libs (#1665)

Replaces the local crates/cdr (vectorcraft-cdr) crate with craft-cdr
from storytold/craft-libs#2697 (storytold/craft-libs#778), keeping
VectorCraft's document/artboard/layer/shape mapping in crates/engine.

Co-authored-by: dotCooCoo <[email protected]>

* build(cdr): pin craft-cdr to craft-libs main (75d179f8df)

* build(cdr): pin craft-cdr to craft-libs main (9b28b56bc7)

* docs(cdr): point CDR/CMX provenance and test paths to craft-cdr

---------

Co-authored-by: dotCooCoo <[email protected]>
2026-11-20 20:27:55 -05:00
dotCooCoo b0fba57f4a Plug-ins: the host checks the WebAssembly features a plug-in uses
Plugin::load now validates each module with wasmparser and a fixed list
of WebAssembly features before wasmi reads it: mutable globals, sign
extension, saturating conversions, multi-value, bulk memory, reference
types, tail calls, extended constant expressions and floats. A module
that uses any other feature is refused, so a wasmi upgrade, a change to
its defaults or one of its crate features turned on elsewhere in the
build does not change what a plug-in may use. wasmi's Config is set to
the same list for every setter it has in this build.

The list is the set wasmi accepted before, without multi-memory. A
second memory was already refused by the one-memory limit; its error
now says "multiple memories". No module that loaded before is refused.

wasmparser 0.228.0 is the version wasmi 2.0.0 already uses.

A new test loads a plug-in that uses each listed feature and checks
that modules using SIMD, relaxed SIMD, memory64, a second memory,
custom page sizes, wide arithmetic, threads, exceptions, legacy
exceptions, function references or garbage collection are refused with
an error that names the feature.

docs/plugins.md lists the whole set; it named only four of the allowed
features before.
2026-11-20 17:25:01 -08:00
Dylan M. Taylor f987648e96 eps: delegate scene-writer shading, image stream, and line style syntax to craft-ps (#8810)
* eps: delegate scene-writer shading, image stream, and line style syntax to craft-ps

* chore(eps): repin craft-ps to merged craft-libs main (cfcc86242)
2026-11-20 03:01:58 -05:00
Dylan M. Taylor 54f58fff31 eps: cut over PostScript scanner (lex.rs) to craft-ps (#8793)
* eps: cut over PostScript scanner (lex.rs) to craft-ps

* chore: repin craft-ps to craft-libs main
2026-11-19 21:05:18 -05:00
Dylan M. Taylor b8c15be445 Merge remote-tracking branch 'origin/main' into cutover/jpeg-icc-replace
# Conflicts:
#	Cargo.toml
2026-11-19 16:47:43 -05:00
Dylan M. Taylor 7d44f644e8 color: use shared craft-cms palette codecs with localized errors 2026-11-19 13:52:36 -05:00
Dylan M. Taylor 05fffe3020 doc: delegate JPEG ICC replacement to craft-image-codecs 2026-11-19 11:00:14 -05:00
FredAppsandCodex cb8f5e0405 chore: unify shared craft-libs pin for HPGL and palette (#8703)
* 778: align shared dependencies on merged HPGL repair [skip ci]

* 778: record Windows-resolved unified shared lock [skip ci]

* 778: prepare unified merged palette dependency revision [skip ci]

* 778: record Windows-resolved palette revision lock [skip ci]

---------

Co-authored-by: Codex <[email protected]>
2026-11-19 09:18:36 -05:00
dotCooCoo dace34d9a8 Merge main into feat/cdr-import-all 2026-11-17 20:24:50 -08:00
dotCooCoo 61abac22bf Merge main into chore/craft-libs-exr-deep-offsets
# Conflicts:
#	Cargo.toml
2026-11-17 07:20:10 -08:00
Dylan M. Taylor 34dd4b53ab Pin shared HP-GL lexer to merged prerequisite 2026-11-17 07:45:20 -05:00
dotCooCoo fc1ed0acb6 Merge main into chore/craft-libs-exr-deep-offsets 2026-11-16 19:51:24 -08:00
Dylan M. Taylor 09fbf82e0e cad: use shared HP-GL byte lexer, preserve interpreter and writer (#8282) 2026-11-16 22:34:09 -05:00
Dylan M. Taylor 23ba5c8d47 SVG: use the shared standard Base64 encoder (#8280) 2026-11-16 22:22:39 -05:00
dotCooCoo 07afd411bb Dependencies: take every craft-libs crate from craft-libs main at 64b181977a
Every storytold/craft-libs git dependency, the hayro, krilla and
linesweeper patches and the web app's craft-web-api now use one
revision, 64b181977a, so Cargo.lock holds one copy of each craft-libs
crate. craft-ui's docking Monitor has a new work_area field; the
monitors VectorCraft lists set it to None, as winit reports no work
area.
2026-11-16 18:57:11 -08:00
dotCooCoo be5c81f366 Merge main into chore/craft-libs-exr-deep-offsets 2026-11-16 18:45:23 -08:00
FredApps 9a01d266b0 Merge pull request #8152 from storytold/cutover/shared-packbits
refactor: share TIFF and EPS PackBits encoding
2026-11-16 23:30:20 +01:00
Dylan M. Taylor ca7ad8db03 fix(deps): pin PackBits and PDF cohort to merged shared revision 2026-11-16 16:04:48 -05:00
dotCooCoo f9f311d081 Dependencies: take craft-image-codecs from craft-libs main at 3af718585c
craft-image-codecs moves from a499742a93 to 3af718585c on craft-libs main.
It brings in storytold/craft-libs#1758: a deep EXR file with more than one
part now finds each part's chunks after every part's offset table, and an
offset table that runs past the end of the file is an error.

The move also brings in the other merged changes to craft-image-codecs and
the craft-jpeg, craft-metadata and craft-tiff copies it uses: #1646, #1686,
#1837, #1838, #1867 and #1889. #1774 moves DDS reading and writing into the
new craft-dds crate, which adds BC4 and BC5 textures. The other craft-libs
crates stay at their current revisions. craft-svg keeps its own
craft-image-codecs at 431f704478, which it only uses for PNG, JPEG, GIF and
WebP images.
2026-11-16 11:56:21 -08:00
dotCooCoo ded0208da2 Merge main into feat/cdr-import-all 2026-11-16 10:34:24 -08:00
Dylan M. Taylor aa5d042441 deps: synchronize PDF backend pins with shared stream codecs 2026-11-16 11:25:29 -05:00
Dylan M. Taylor ae86489406 render: delegate TIFF and EPS PackBits encoding to craft-stream-codecs 2026-11-16 10:08:08 -05:00
FredApps 4a328df848 Merge remote-tracking branch 'origin/main' into refactor/eps-shared-write 2026-11-16 14:56:00 +01:00
Dylan M. Taylor 568d25bf17 Merge main and preserve EPS shared writer dependency 2026-11-16 07:34:47 -05:00
Dylan M. Taylor ebf49351e6 build(eps): pin merged shared PostScript writer 2026-11-16 07:15:30 -05:00
FredApps 631441ce86 svg: write the document wrapper through craft-svg (#778, #789)
The XML declaration, DOCTYPE entity subset and root <svg> open now go
through SvgWriter. Mapping and the rest of the document stay in the app.
Width and height stay unitless in one place so #7105 can rebase.
2026-11-16 13:10:03 +01:00
Dylan M. Taylor 7b895f0bf0 refactor(eps): delegate PostScript write primitives to craft-ps 2026-11-16 06:23:46 -05:00
dotCooCoo 8c8b04a4b2 Merge main into feat/cdr-import-all 2026-11-15 22:06:03 -08:00
FredApps 39e36e342f Pin craft-libs to a499742a (craft-libs#1779 and #1782)
craft-libs main with the JPEG inks reader vectorcraft-doc's CMYK JPEGs use
(#1779) and the craft-jpeg fallback for frames zune-jpeg panics on
(#1782). Cargo.lock regenerated.
2026-11-16 05:12:41 +01:00
FredApps be428f3fcf engine: keep the image size checks and depth of main through the cutover
Remove Background and Color Mask check the image's size from its header
again before decoding ("an image of W × H pixels is too large to change"),
and Crop Image's trim and Remove Background read a file that can't hold
the pixels its header declares as unreadable, as on main. The test helper
reading Remove Background's output keeps 16-bit samples.

The HEIF and JPEG XL readers and their tests go back to main's (heic-rs and
jxl-oxide): the craft-heif and craft-jxl versions failed eight of their
tests (resolution axes after a quarter turn, the container's mirror and
crop, refusing a grid of cropped tiles, 16-bit samples, the decode
allowance). Moving them stays to do.
2026-11-16 03:33:57 +01:00
FredApps d2b8ebfd95 Merge origin/main into feat/cutover-remaining-codecs 2026-11-16 01:57:11 +01:00
FredApps 273dd79442 refactor(doc): read Group 3 TIFF rows through craft-stream-codecs
group3_tiff_rgba decodes each strip or tile with
craft_stream_codecs::decode_ccitt_raw instead of hayro-ccitt; the error
messages stay as they were. vectorcraft-engine's group3_reference test
keeps the hayro-ccitt reader as the reference: over 190 Group 3 TIFFs and
5,500 cut or edited copies the pixels and refusals match, except that a
strip or tile wider than MAX_CCITT_COLUMNS (2^20) is refused as an
overflow where hayro-ccitt ran out of data. Needs craft-libs#1772.
2026-11-16 01:56:14 +01:00
FredApps 58174c6642 refactor(doc): read CMYK JPEG inks and headers through craft-image-codecs
The CMYK reader's JPEG side (inks, component count, size, ICC profile)
uses craft_image_codecs::jpeg_inks instead of zune-jpeg, which stays only
as the dev-dependency the comparison test reads with: inks, sizes,
component counts and profiles match it over CMYK, YCCK, RGB and gray
JPEGs, whole and cut off. Frames zune-jpeg panicked on read as no inks.
Needs craft-libs#1779.
2026-11-16 01:13:46 +01:00
Dylan M. Taylor 8ee5acc04e Merge pull request #7866 from storytold/codex/shared-gzip-consumer
Use shared streaming native format writer
2026-11-15 17:28:04 -05:00
FredApps 48a8f2a464 Merge remote-tracking branch 'origin/main' into feat/cutover-remaining-codecs 2026-11-15 22:16:07 +01:00
FredApps 0f2cb22ce7 chore(codecs): keep craft-image-codecs on craft-libs main (d6cd7836d)
b3b8521ab isn't on craft-libs main. Its probe_stored_size was only needed for
DXF image sizes, which vectorcraft_doc::header_size already reads from PNG,
JPEG, BMP and TIFF headers.
2026-11-15 21:18:51 +01:00
FredAppsandFredApps bb218101c9 cad: export DXF through craft-dxf's drawing writer (#7847)
* cad: export DXF through craft-dxf's drawing writer

Delete the local ASCII writer and map the document through
craft_dxf::drawing. Public vectorcraft_cad::export, DxfOptions and
DxfVersion stay so vectorcraft#3068 can rebase without a writer API
change. Pin craft-dxf at the craft-libs#1588 branch tip; update the
rev after that PR merges. Golden files lock shapes_doc() bytes for
R12 and 2018 against the old writer. Part of storytold/craft-libs#791
and #778.

* cad: pin craft-dxf to the #1588 tip with Dylan's writer fixes

Point craft-dxf (and craft-codepage from the same rev) at
0b6244f2b9971deaeb6a79d932c818ff94479757, which includes the
Windows golden line-ending fix, BYBLOCK and image-dictionary
key changes, and the compile fix for the dictionary-key test.
Update the pin again to the merge commit after #1588 lands.

* cad: pin shared DXF writer to merged craft-libs #1588

---------

Co-authored-by: FredApps <[email protected]>
2026-11-15 21:07:18 +01:00
FredApps 8ce8ae076e Merge remote-tracking branch 'origin/feat/cutover-remaining-codecs' into work7669
# Conflicts:
#	crates/cad/src/scene.rs
2026-11-15 21:06:41 +01:00
Dylan M. Taylor 9c833595ed Use stored raster preflight for DXF PNG and JPEG images 2026-11-15 19:01:49 +00:00
FredApps b652c6697c fix(codecs): keep main's behaviour where the cutover changed it
- EPS CCITTFaxDecode goes back to hayro-ccitt (main's filters.rs and data.rs):
  craft-stream-codecs decodes /K -1 /Columns 70 data to other rows
  (eps import::tests_images::ccitt_fax_images_draw). DCTDecode is main's again.
- The AI editing writer decodes through the image crate again: going through
  RGBA8 lost 16-bit sources, so their 8-bit warning disappeared
  (ai_editing::tests::sixteen_bit_images_are_written_at_eight_bits).
- Crop Image refuses an image over its allowance by header size again, with
  main's "an image of W × H pixels is too large to draw" message.
- Test fixes: colorized_images writes its gray PNGs gray again, and the PDF
  16→8-bit test expects rounding, as the 8-bit copy is made.
2026-11-15 19:01:25 +01:00
Dylan M. Taylor 40518f790c Pin native writer APIs to merged craft-libs 2026-11-15 16:56:16 +00:00
FredApps 5d492ebad2 Merge #7664 (fix/restore-codec-cutover-ci) into feat/cutover-remaining-codecs
Conflicts resolved in favour of main/#7664 in the 13 source files both touched
(doc/cmyk.rs, metafile/dib.rs, pdf images, svg import/files.rs, render paint and
encode tests, trace, engine load.rs), keeping main's newer TIFF/CMYK, DIB and PDF
image fixes. vectorcraft-doc stays on main's version until its CMYK reader moves
to craft-tiff. The image crate keeps its format features, and usvg, tiff,
zune-jpeg, hayro-ccitt and jpeg-encoder stay for the readers not yet moved.
Codec crates pinned to craft-libs d6cd7836d364177661b0ae17f48a0805e83a5f32.

Also fixes the compile errors CodeRabbit flagged (jp2read DecodeOptions,
filters.rs use-after-move) and the encode() arity at d6cd7836d.
2026-11-15 17:35:43 +01:00
Dylan M. Taylor 3492976910 Use shared streaming native format writer 2026-11-15 15:16:59 +00:00
dotCooCoo e40ef16b68 Merge main into feat/cdr-import-all 2026-11-14 16:31:57 -08:00
Dylan M. Taylor 1306afb5e8 Cut over roxmltree, png, tiff, psd, and trace codecs to craft-libs (#7638) 2026-11-14 23:25:19 +00:00
Dylan M. Taylor 3cb16efabb chore: align craft-libs and hayro patches to d6cd7836d 2026-11-14 21:44:58 +00:00
Dylan M. Taylor 1d6c4dcd14 chore(codecs): cut over remaining image/tiff/ccitt codecs to craft-libs 2026-11-14 21:19:30 +00:00