mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-04 21:12:57 -05:00
File > Open, File > Place and document.dxfInfo read DWG drawings. The craft-libs craft-dwg bridge converts the drawing to DXF bytes and the existing DXF reader reads them, so a DWG takes the DXF Import Options (layout, ratio or fit, lineweights, centering, merged layers) and comes in with the same layers, blocks and units as the DXF it converts to. What the conversion skips is listed in the warnings. - vectorcraft-cad: dwg module. On desktop the conversion runs in a copy of the program started with --dwg-worker (vectorcraft and vectorcraft-cli call serve_if_asked and use_own_worker), so a damaged file ends that copy, not the app. Inputs over 512 MiB, or a DXF rendition over 1 GiB, are refused. The last conversion (up to 128 MiB of DXF), or its error, is kept, so the dialog's layout list, each layout preview and the open read the file once. R1.x and R2.x drawings are refused with a hint to save as DXF. - Engine: a read-only dwg format (detected by content or by .dwg), in the open and place extension lists, not associated with the app by packaging. DWG leaves the unsupported list; exporting to it says to export DXF instead, Export As keeps it greyed out, and Save over the drawing is refused. - UI: the DXF Import Options dialog opens for .dwg files on Open, Place and a Shift-click with the place cursor. - NOTICE and licenses/acadrust-0.6.6/: acadrust 0.6.6 (MPL-2.0, unmodified) and its third-party notices. - Docs: docs/mcp.md, docs/file-format-parity.md, docs/roadmap.md and the progress line in docs/target-app-parity.md. Tests build DWG files from DXF drawings with craft-dwg's writer: a DWG comes in as its DXF does (layers, bounds, strokes, units, blocks), with the DXF options, through Place, and in dxfInfo; a truncated DWG is an error; saving or exporting a DWG writes nothing. Fixes #3450
163 lines
7.6 KiB
TOML
163 lines
7.6 KiB
TOML
[package]
|
|
name = "vectorcraft-engine"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "VectorCraft engine: sessions, history, selection, the command registry"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
default = ["bundled-fonts", "heif"]
|
|
# The fonts vectorcraft-text bundles (see its `bundled-fonts`). Embedders that supply every font at
|
|
# run time (`vectorcraft_text::FontDb::add_font`) build with `default-features = false`.
|
|
bundled-fonts = ["vectorcraft-text/bundled-fonts"]
|
|
# HEIC and HEIF images open and place, decoded by heic-rs (an HEVC decoder). A build without this
|
|
# feature still recognizes the files and refuses them with a message. The apps list it beside
|
|
# `bundled-fonts`.
|
|
heif = ["dep:heic-rs", "dep:rayon"]
|
|
|
|
[dependencies]
|
|
craft-codepage = { workspace = true }
|
|
# Which paths stored in documents may be opened.
|
|
craft-docpath = { workspace = true }
|
|
craft-proof = { workspace = true }
|
|
vectorcraft-geom = { workspace = true }
|
|
vectorcraft-color = { workspace = true }
|
|
vectorcraft-doc = { workspace = true }
|
|
vectorcraft-tools = { workspace = true }
|
|
vectorcraft-text = { workspace = true }
|
|
vectorcraft-render = { workspace = true }
|
|
vectorcraft-pathops = { workspace = true }
|
|
# The panels and hinges of a packaging blank (Packaging Tools' Check Fold Lines).
|
|
vectorcraft-three-d = { workspace = true }
|
|
vectorcraft-brush = { workspace = true }
|
|
vectorcraft-trace = { workspace = true }
|
|
vectorcraft-svg = { workspace = true }
|
|
vectorcraft-format = { workspace = true }
|
|
vectorcraft-pdf = { workspace = true }
|
|
vectorcraft-cad = { workspace = true }
|
|
vectorcraft-eps = { workspace = true }
|
|
vectorcraft-metafile = { workspace = true }
|
|
vectorcraft-plugins = { workspace = true }
|
|
vectorcraft-affinity = { workspace = true }
|
|
craft-cdr = { workspace = true }
|
|
# `.pcraft` documents opened and placed as images (cmd/fileio/pcraftread.rs).
|
|
craft-doc = { workspace = true }
|
|
vectorcraft-scriptcheck = { workspace = true }
|
|
vectorcraft-js = { workspace = true }
|
|
# The commands' parameter schemas (schemas.rs).
|
|
vectorcraft-apischema = { workspace = true }
|
|
image = { workspace = true }
|
|
craft-image-codecs = { workspace = true }
|
|
tiff = { workspace = true }
|
|
jxl-oxide = { workspace = true }
|
|
jxl-color = { workspace = true }
|
|
jxl-grid = { workspace = true }
|
|
# Pure Rust, no unsafe; pinned at the version photocraft-heif uses.
|
|
heic-rs = { version = "=0.1.4", default-features = false, features = ["std"], optional = true }
|
|
flate2 = { workspace = true }
|
|
chrono = { workspace = true }
|
|
# The XML parts of Word documents placed as type (place/docx.rs).
|
|
craft-xml = { workspace = true }
|
|
# The compound file that holds a Word 97-2003 document placed as type (place/doc.rs).
|
|
cfb = "0.15"
|
|
# The Text Import Options character sets other than Unicode and ANSI (place/text.rs). Already in
|
|
# Cargo.lock (vectorcraft-eps), so this adds no new crate.
|
|
encoding_rs = { workspace = true }
|
|
kurbo = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
log = { workspace = true }
|
|
# Whether two file names differ only in their Unicode normalization form, in a folder that ignores
|
|
# it (`script::dom::raster_capture`). Already in Cargo.lock, so this adds no new crate.
|
|
unicode-normalization = "0.1.26"
|
|
|
|
# Whether a recovery area folder is this account's own (`FolderStore::own_area`), and opening a
|
|
# file without following a link (`store::read_capped_plain`). Already in Cargo.lock (tempfile,
|
|
# ui-egui), so this adds no new crate.
|
|
[target.'cfg(unix)'.dependencies]
|
|
rustix = { workspace = true, features = ["std", "process", "fs"] }
|
|
|
|
# Whether a recovery area's lock file is still the one that was opened (`FolderStore::still_named`),
|
|
# and whether two paths a script names are one file (`script::files`). Already in Cargo.lock
|
|
# (walkdir), so this adds no new crate.
|
|
[target.'cfg(windows)'.dependencies]
|
|
same-file = "1.0.6"
|
|
# Credential Manager, the system key store of grant_keys.rs on Windows (see keyring-core below).
|
|
windows-native-keyring-store = "1.1"
|
|
|
|
# The tiles of a HEIC photo decode in parallel on native; wasm stays single-threaded.
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
heic-rs = { version = "=0.1.4", default-features = false, features = ["std", "parallel"], optional = true }
|
|
rayon = { version = "1.12", optional = true }
|
|
# Language packs (packs.rs): the shared font store installs them and finds its folder. Already in
|
|
# Cargo.lock (craft-font-manager), so this adds no new crate.
|
|
craft-font-store = { workspace = true }
|
|
craft-font-catalog = { workspace = true }
|
|
# The MAC that `grants.json` carries (grant_keys.rs) and the random key it is made with, which the
|
|
# user's key store keeps: Keychain on macOS, Credential Manager on Windows, the Secret Service on
|
|
# Linux. All MIT OR Apache-2.0.
|
|
hmac = "0.12.1"
|
|
sha2 = { version = "0.10", default-features = false }
|
|
getrandom = "0.4"
|
|
keyring-core = "1.1"
|
|
|
|
# The system key store of grant_keys.rs on each platform, connected through keyring-core: the same
|
|
# store crates and features that keyring 4.2 uses. All MIT OR Apache-2.0.
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
apple-native-keyring-store = { version = "1.0.2", features = ["keychain"] }
|
|
|
|
[target.'cfg(all(unix, not(any(target_os = "macos", target_os = "ios", target_os = "android"))))'.dependencies]
|
|
zbus-secret-service-keyring-store = { version = "1.0.1", features = ["crypto-rust"] }
|
|
|
|
[dev-dependencies]
|
|
# DWG files for the `.dwg` open and place tests, written from DXF by craft-dwg.
|
|
craft-dwg = { workspace = true }
|
|
# JPEG XL files for the `.jxl` open and place tests.
|
|
zune-jpegxl = { workspace = true }
|
|
zune-core = { workspace = true }
|
|
# JPEG XL files for the import fuzz tests (tests/import_fuzz.rs).
|
|
craft-jxl = { workspace = true }
|
|
# vectorcraft-doc's Group 3 TIFF reader before craft-stream-codecs, the reference
|
|
# tests/it/group3_reference.rs compares it with.
|
|
hayro-ccitt = { workspace = true }
|
|
craft-stream-codecs = { workspace = true }
|
|
vectorcraft-affinity = { workspace = true, features = ["synth"] }
|
|
craft-cdr = { workspace = true, features = ["synth"] }
|
|
crc32fast = { workspace = true }
|
|
vectorcraft-testkit = { workspace = true }
|
|
proptest = { workspace = true }
|
|
# A variable font built in code (no font file is committed).
|
|
vectorcraft-text = { workspace = true, features = ["test-fonts"] }
|
|
# Holds the installed plug-ins steady while a test counts what a cache keeps.
|
|
vectorcraft-plugins = { workspace = true, features = ["test-steady"] }
|
|
# How many times an open reads a PDF, and the work its import takes.
|
|
vectorcraft-pdf = { workspace = true, features = ["read-count"] }
|
|
# The work `.ai` blends take to be checked and made live, and how many included EPS open checks
|
|
# an open performs.
|
|
vectorcraft-eps = { workspace = true, features = ["work-count"] }
|
|
# How many times the symbol list is read to find symbols by name, and how many objects are
|
|
# measured against locked artboards.
|
|
vectorcraft-doc = { workspace = true, features = ["symbol-read-count", "locked-artboard-count"] }
|
|
wat = { workspace = true }
|
|
# Zstandard streams for the Illustrator editing data fuzz tests.
|
|
ruzstd = { workspace = true }
|
|
# The JavaScript parser's lexer, compared with the script checker's on the same scripts.
|
|
vectorcraft-js = { workspace = true }
|
|
# A bundled font's own glyph boxes, for the glyph bounds tests.
|
|
skrifa = { workspace = true }
|
|
|
|
# The files of other crates that this crate compiles or its tests read, for CI's test selection.
|
|
[package.metadata.craft]
|
|
reads = [
|
|
"crates/affinity/tests/support/corpus.rs",
|
|
"crates/affinity/tests/support/text_fixture.rs",
|
|
"crates/apischema/src/conformance.rs",
|
|
"crates/plugins/tests/fixtures/desaturate.wasm",
|
|
"xtask/affinity-corpus.sha256",
|
|
"xtask/src/sha256.rs",
|
|
]
|