* SVG import: refuse an SVG the memory can't hold instead of running out
The element limit now follows the installed memory, or the process's
cgroup limit where that is lower: about 8 KB an element, up to the
999,999 elements usvg reads. Past it the SVG is refused with an error
naming the memory, before usvg makes its tree.
Fixes#10165
* Tests: the shared element limit test follows the machine's limit
craft-libs main at 2680a3b3f adds #4364 (its egui pin moves to
07c20531, which VectorCraft's egui lines now match), #4425, #4409, #4414,
#4406, #4349, #4393, #4392, #4398, #4415, #4411, #4402, #4400, #4417,
#4399, #4407, #4375, #4428 and #4451. winit stays at 0dfcec0e, the rev
craft-libs pins. craft-nightly and craft-web-api move with the other
craft-libs crates, and xtask pdf-deps checks the new rev. Cargo.lock:
epaint_default_fonts now depends on brotli 9.1.3 and brotli-decompressor
6.3.2.
craft-nightly was still pinned at 1f6c3a21f while every other craft-libs
crate moved to aa7e668ec. The newer craft-nightly brings:
- craft-libs#4297: profile-root validation requires HOME on Unix and
APPDATA and LOCALAPPDATA on Windows, and refuses a configured OS
directory that is relative or contains `..`
(ProfileError::MissingStableBoundary and InvalidStableBoundary).
- craft-libs#4304: a Unix socket (or AF_UNIX socket on Windows) in a
profile's single-instance/ folder is accepted when the app lists that
folder, and Launch reports whether the launcher's `--` separator was
present (passthrough_args_with_launcher_separator).
- craft-libs#4309: a Windows test fix only.
VectorCraft builds against these without code changes: it does not
construct Launch or match ProfileError exhaustively, and its
single-instance record is instance.json with a TCP listener. Cargo.lock
adds uds_windows (already in the lock) to craft-nightly's dependencies.
The Layers panel built its row order again on every selection change:
each change made a new Tracked for the rows, and the rows reported no
order revision, so the panel asked every row for the rows inside it
(7 calls for the 6 rows of the new test's document).
- LayerRows reports LayerTree::order_revision: a hash of the document,
the open rows, Show Layers Only and the isolated node. The selection,
the highlighted rows, the current layer and the names are not in it.
- refresh_rows writes new rows into the kept Tracked while the document
(uid and revert count) stays the same, and makes a new Tracked for
another document or after File > Revert.
- The craft-libs pin moves from 186a229c8 to aa7e668ec, current
craft-libs main, which has craft-libs#4319 (LayerTree::order_revision).
The winit rev moves to 0dfcec0eb, as craft-libs pins it; egui stays
at 14c39fed1. xtask pdf-deps checks the new rev. craft-nightly keeps
the rev main pins it at.
Two tests failed on the new craft-libs:
- canvas::tests::a_selection_drag_draws_its_marks_in_the_frame_the_pointer_moves:
since craft-libs#4143 a frame runs one pass where it ran two, and the
bounding box, Live Corners, hollow corners and shape widgets were drawn
before the tool host took the frame's pointer event, so the box showed
at the old corner. They are now drawn after it, into paint slots kept
in their old order.
- tests::nativemenu::applying_a_dialog_preview_reads_the_menus: since
craft-libs#4350 the closed dialog's angle field gives up the keys one
frame sooner, so the menus are sent again without the text-editing
gate within the frames the test ran. The test now waits for the gate
and counts the read and that send apart.
* feat(nightly): wire craft-nightly for self-isolated direct launch
* fix(nightly): answer plain version before resolving profile root
* test(nightly): retain exact version and saved profile coverage
- apps/vectorcraft-web: egui_extras moves to the wasm32 dependencies.
Its only use is src/web.rs, which builds only for wasm32, so cargo
reported it unused on native builds.
- apps/vectorcraft: drop the socket2 dev-dependency. Its loopback
tests left control_server in #8800 and nothing uses it now.
- xtask: the doc-test steps (`cargo xtask ci shard` and the workspace
doctests) leave out packages whose only library target is a cdylib,
dylib or staticlib. Cargo printed "doc tests are not supported for
crate type(s) `cdylib`" for vectorcraft-thumbnail-handler. Packages
without a library stay selected, so the shard keeps its features.
Warnings on the build host, before and after (cache warm shard
`cargo test -p vectorcraft-mcp -p vectorcraft -p vectorcraft-cli
-p vectorcraft-web -p xtask --lib --bins --no-run` on a fresh build, and
`cargo test -p vectorcraft-thumbnail-handler --doc`): 4 before, 1 after.
The one left is `vectorcraft-testkit` in apps/vectorcraft-cli: only the
integration tests use it, and the warm step builds only library and
binary tests.
Every cargo command printed seven manifest warnings, and clippy on all
targets printed one more. Each entry below had no reader on main.
- peniko (workspace dependency): no member crate has ever declared it.
It has been in the list since the workspace skeleton (bfee80a22c).
crates/render reaches peniko through vello_cpu::peniko.
- rfd and webbrowser (workspace dependencies): #8800 moved the app onto
the craft UI framework and removed their last declarations in
apps/vectorcraft and crates/ui-egui. The folder picker and the browser
links now come from craft-libs. The rfd name in xtask's layer check
is a crate name to reject, so it does not read this entry.
- workspace.package.repository: no member crate sets
repository.workspace = true, and no packaging script, xtask command or
workflow reads the field.
- egui_demo_lib, egui_inspection and egui_system_font_provider
([patch.crates-io]): #8800 copied these from craft-libs' own patch
list, and nothing in VectorCraft's graph depends on them. Cargo.lock
listed them under [[patch.unused]]. A dependency's [patch] does not
apply in this workspace, so removing them does not change how
craft-libs builds. The egui crates that are in the graph keep their
patches at 932a73b285.
- apps/vectorcraft-web declared egui_extras for every target, but only
the wasm32 module web.rs calls it. It now sits under the wasm32
target dependencies.
Cargo.lock drops the three [[patch.unused]] entries.
Keep the native and web craft-libs pins, Cargo.lock and PDF source checks on 57c8c8d4. Preserve the matching egui pin. Consult the shared Standard-mode chrome state for visibility and for show-panel requests; the dock already honors that state when drawing.
Keep native and web manifests, the lockfile, and the PDF source guard on the same craft-libs revision. Align the egui patch revision with craft-libs to retain one crate source.
Every craft-libs crate moves from f762f98a to 81bca5c8e2 (craft-libs
main). The new rev adds the title bar's item gap, docking of part of a
collapsed column, the tool rail's footer rule, disabled accessibility
nodes that ignore actions, and built-in themes that load without a
cycle search. VectorCraft builds on it without other changes.
- Every craft-libs crate moves from 610c86792a to f762f98a (craft-libs
main), which adds the fixed corner-widget inset, the ruler corner's
plus, popover padding, and a native window's move recorded once.
- The status bar's Zoom field uses ZoomField::status_bar, so it draws
without an outline in the status bar's look.
- The Rotate View compass is placed in CanvasScrollbars::clear_of
instead of a copy of the scroll bars' sizes.
- The tools' corner-widget inset is public, and a test holds it equal
to CornerWidgets::INSET, the inset the canvas draws the widgets at.
Every storytold/craft-libs crate and the hayro, krilla and linesweeper
patches move from 51fcc3b041 to 610c86792a, the head of craft-libs main.
xtask pdf-deps expects the new rev.
As asked in review. Cargo.toml: main moved craft-libs to 51fcc3b0; the font
store crates this branch adds move with it, so every craft-libs crate stays
at one rev.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
File › Open and File › Place read layered raster .pcraft documents
through craft-doc and store them as one PNG, sized by the document's
resolution. A placed file links like any image.
- The image is the file's full-size composite when it has one.
- Without one, the layers are combined at the canvas size when the
document is RGB at 8 or 16 bits and every visible layer is a raster
layer that blends Normal, with no clipping, layer effects, vector
mask, frame, advanced blending or feathered layer mask. Hidden layers
are not read, and an RGB ICC profile the document names is kept.
- Otherwise the composite preview comes in at the canvas's size, and
Open, Place, links.update, links.relink and links.replaceEmbedded
warn when it has fewer pixels than the canvas, naming both sizes and
why the layers were not combined.
- A full-size composite or preview the file names but doesn't hold,
can't decode or, for the full-size one, of another size than the
canvas is an error. The Links commands decode the kept PNG before
taking it.
The import fuzz tests cover mutated bundles and manifests.
The new apps/vectorcraft-thumbnail-handler crate builds
vectorcraft_thumbnail_handler.dll, a thumbnail handler (IThumbnailProvider
with IInitializeWithStream) for .vectorcraft, .drawcraft and .vctemplate
files. Explorer passes it the file's bytes. It writes them to a file in
%USERPROFILE%\AppData\LocalLow\VectorCraft\Thumbnails (the temp folder when
that can't be made), runs `vectorcraft-cli thumbnail --size N` from the DLL's
folder on that file, and returns the PNG as a top-down 32-bit bitmap with
premultiplied alpha, at most 1024 pixels on its longer side. A file larger
than 256 MiB, a failed run, or a run longer than 25 seconds returns an error,
and Explorer shows the file's icon. Explorer gives the handler the file's
bytes and not its path, so a linked image found only relative to the
document's folder shows the preview saved with it.
`regsvr32 vectorcraft_thumbnail_handler.dll` registers the handler for the
current user under HKCU\Software\Classes, and `regsvr32 /u` removes the class
key and each extension's ShellEx key that names it. The Windows packages do
not build, ship or register the DLL yet.
The COM code is Windows-only and has a module-scoped unsafe_code allowance.
The registry values, the stream limit, the PNG conversion and the
vectorcraft-cli run build on every system, and their tests run in CI.
The plug-in runtime keeps main's JavaScript plug-ins beside the web worker's module bytes and checked loads: a JavaScript plug-in's bundle is kept for the worker like a module, and load_checked loads it from its bundle.
The test shards' feature check (`cargo xtask ci shard`) stopped every
shard before any test ran: "vectorcraft-eps: features [] in shard 4,
[work-count] with the whole workspace". Only vectorcraft-engine's
dev-dependencies turned the feature on, and shard 4 tests
vectorcraft-eps without vectorcraft-engine. vectorcraft-eps now turns
it on in its own dev-dependencies, as vectorcraft-pdf does for
read-count, so it builds with the same features in its shard as in the
whole workspace.
The gate's test shard 4 builds vectorcraft-plugins without
vectorcraft-engine, which was the only crate that turned the
test-steady feature on, so `cargo xtask ci shard` stopped at its
feature check on every shard. vectorcraft-plugins now turns the
feature on in its own dev-dependencies, as vectorcraft-pdf and
vectorcraft-affinity do for their test features.
All storytold/craft-libs crates and the hayro, krilla and linesweeper
patches move from b0d422cf0c to 51fcc3b041, the head of craft-libs main
(craft-libs#3718). craft-libs main now holds what was on next, so the
pin follows main as AGENTS.md rule 10 asks. The move brings the .cmx
writer (craft-libs#2807) and the macOS Save sheet Format menu
(craft-libs#3565). xtask pdf-deps expects the new rev.
The egui patches move from b15ffe9bfc to 932a73b285, the egui rev
craft-libs main pins: craft-ui-contract at 51fcc3b041 calls
Context::set_pointer_move_gate and Context::widgets_at, which
storytold/egui adds after b15ffe9bfc.
App changes the move needs:
- AppShell's title, options, status and hint slots take a version
function (craft-libs c417cd3050). Each passes |_| None, so every slot
still runs in every pass.
- PartResult::hover_pos is private (craft-libs 27e8a77145). The track
cube reads the pointer through Cx::hover_pos, which is None when the
cube is not hovered, as the old filter on hovered was.
- craft_dxf::write_binary returns a Result (craft-libs#3347, binary DXF
writing fails on an invalid integer). The binary DXF import test
unwraps it.
Test changes the move needs:
- An inline slider field now shows its slider before its number field,
and both carry the field's name (craft-libs#3553). The panel harness
types into the number field, the part that takes typing, and the
plug-in effect test reads the number field's value.
- A painted tool cursor's marks use the overlay.cursor token (craft-libs
a830ff539b), so the cursor test looks for that color.
- The Keyboard Shortcuts area tabs are named by their visible label,
"Show:" (craft-libs 702cb295c6).
- The gradient stop's color mode menu now opens over part of the stop
editor. The test clicks the Web Color Sliders row where it lies
outside the editor, as before, and keeps the same checks.
Cargo.lock adds what the new craft-libs crates depend on
(craft-control-protocol, craft-font-os-windows, ed25519-dalek and its
dependencies, jpeg-encoder 0.7.1 for craft-image-codecs).
wasmi 2.0.0 miscompiles a multi-value br_table whose targets take the
same values when another operand sits under those values: the targets
read their values from slots the branch never wrote
(https://github.com/wasmi-labs/wasmi/pull/2106, fixed in 2.0.2). A
plug-in that branched that way got wrong results. 2.0.1 to 2.0.3 also
fix other miscompilations, a use-after-free on resuming a call on
another store, and memory.grow past a declared maximum bypassing the
resource limiter
(https://github.com/wasmi-labs/wasmi/blob/main/CHANGELOG.md).
Only Cargo.lock changes: the workspace requirement "2.0.0" allows
2.0.3, and wasmi 2.0.3 still uses wasmparser 0.228.
The new abi test runs such a branch table for each of its targets; it
fails on 2.0.0 with the plug-in's unreachable trap.
Part of #4936. Spelling and hyphenation now read the Language packs
installed in the font store the Craft apps share, and proof.packs,
proof.installPack and proof.removePack list, install and remove them.
Installs need downloading on, which only the person turns on; in the
desktop app they run in the background and the documents are laid out
again when one ends.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep XMP file buffers in native state and release them at the file run boundary. Count registered namespaces and expanded metadata against the heap limit. Reset marked readers after updates and allow failed library setup to retry.