2026-03-22 14:56:27 +03:00
|
|
|
[package]
|
2026-05-23 17:16:15 +03:00
|
|
|
name = "OpenCADStudio"
|
2026-06-16 04:30:27 +03:00
|
|
|
version = "0.5.7"
|
2026-03-22 14:56:27 +03:00
|
|
|
edition = "2021"
|
|
|
|
|
build = "build.rs"
|
|
|
|
|
|
2026-06-15 01:36:04 +03:00
|
|
|
[workspace]
|
|
|
|
|
members = ["crates/ocs_plugin_api"]
|
|
|
|
|
|
2026-06-16 04:10:01 +03:00
|
|
|
# Embed the application icon into the Windows .exe so Explorer, the taskbar,
|
|
|
|
|
# the Start-menu tile and file-association entries show it (issue #107).
|
|
|
|
|
[target.'cfg(windows)'.build-dependencies]
|
|
|
|
|
winresource = "0.1"
|
|
|
|
|
|
2026-06-16 13:01:19 +03:00
|
|
|
[features]
|
|
|
|
|
default = ["solid3d"]
|
|
|
|
|
# 3-D solid modelling: B-rep tessellation (truck-meshalgo) and booleans
|
|
|
|
|
# (truck-shapeops). Disabled for wasm builds — truck-meshalgo pulls
|
|
|
|
|
# vtkio → xz2 → lzma-sys (a C library) that does not cross-compile to
|
|
|
|
|
# wasm32. Without this feature the app is a 2-D CAD editor; the Model tab,
|
|
|
|
|
# solid tessellation and ACIS import become no-ops.
|
|
|
|
|
solid3d = ["dep:truck-meshalgo", "dep:truck-shapeops", "dep:lzma-sys"]
|
|
|
|
|
|
2026-03-22 14:56:27 +03:00
|
|
|
[dependencies]
|
2026-06-15 01:36:04 +03:00
|
|
|
# Stable, dependency-free add-on contract (manifest + ribbon/CadModule types).
|
|
|
|
|
# Plugin authors target this crate's semver, not OpenCADStudio internals.
|
|
|
|
|
ocs_plugin_api = { path = "crates/ocs_plugin_api" }
|
2026-06-04 02:34:56 +03:00
|
|
|
# vtkio (pulled in transitively via truck-meshalgo) depends on xz2 → lzma-sys,
|
|
|
|
|
# which by default links the system liblzma dynamically. On macOS that bakes a
|
|
|
|
|
# Homebrew dylib path (/opt/homebrew/.../liblzma.5.dylib) into the binary, so
|
|
|
|
|
# the .app crashes on launch on machines without that exact library (#56).
|
|
|
|
|
# Forcing the `static` feature builds liblzma from the bundled source, making
|
|
|
|
|
# the binary self-contained on every platform.
|
2026-06-16 13:01:19 +03:00
|
|
|
lzma-sys = { version = "0.1", features = ["static"], optional = true }
|
2026-06-16 03:46:24 +03:00
|
|
|
iced = { version = "0.14", features = ["image", "svg", "advanced", "canvas", "smol"] }
|
2026-05-23 22:21:30 +03:00
|
|
|
bytemuck = { version = "1.25", features = ["derive"] }
|
|
|
|
|
glam = { version = "0.33", features = ["bytemuck"] }
|
2026-03-22 14:56:27 +03:00
|
|
|
truck-modeling = "0.6"
|
2026-06-16 13:01:19 +03:00
|
|
|
truck-meshalgo = { version = "0.4", default-features = false, features = ["tessellation"], optional = true }
|
2026-03-22 14:56:27 +03:00
|
|
|
truck-polymesh = "0.6"
|
2026-05-23 22:21:30 +03:00
|
|
|
rfd = "0.17"
|
2026-04-24 01:51:15 +03:00
|
|
|
acadrust = "0.3.4"
|
2026-03-31 08:05:17 +03:00
|
|
|
printpdf = "0.9.1"
|
2026-04-06 14:37:23 +03:00
|
|
|
flate2 = "1"
|
2026-04-06 23:19:08 +03:00
|
|
|
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "bmp", "tiff"] }
|
2026-05-26 22:45:54 +03:00
|
|
|
inventory = "0.3"
|
2026-06-16 13:01:19 +03:00
|
|
|
truck-shapeops = { version = "0.4", optional = true }
|
2026-06-05 00:35:53 +03:00
|
|
|
# Fast non-cryptographic hasher. Handle/u64 keys dominate the hot block,
|
|
|
|
|
# hatch, draw-depth and wire caches; the default SipHash is overkill there.
|
|
|
|
|
rustc-hash = "2"
|
2026-06-16 11:18:17 +03:00
|
|
|
# TrueType/OpenType support: fontdb enumerates the user's installed system
|
|
|
|
|
# fonts; ttf-parser extracts glyph outlines we flatten into CAD wire strokes.
|
|
|
|
|
# Both are already in the tree transitively via iced's cosmic-text, so pinning
|
|
|
|
|
# them here adds no new downloads.
|
|
|
|
|
fontdb = "0.23"
|
|
|
|
|
ttf-parser = "0.25"
|
|
|
|
|
# Full text-layout engine: shaping (ligatures, Arabic joining, kerning), bidi
|
|
|
|
|
# reordering, and — crucially — automatic font fallback (a glyph missing from
|
|
|
|
|
# the chosen family is shaped from another installed font). We use it only to
|
|
|
|
|
# obtain positioned (font, glyph-id) runs; outlines come from ttf-parser and
|
|
|
|
|
# render through our own wire pipeline.
|
|
|
|
|
cosmic-text = "0.15"
|
2026-04-22 22:22:33 +03:00
|
|
|
|
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
2026-06-12 08:00:18 +00:00
|
|
|
# Win32_System_Com — COM behind "Set as default app"
|
|
|
|
|
# (IApplicationAssociationRegistrationUI dialog).
|
|
|
|
|
# Win32_System_Registry — HKCU registration that lists the app under
|
|
|
|
|
# "Open with" for the portable .exe.
|
|
|
|
|
windows-sys = { version = "0.61", features = ["Win32_UI_Shell", "Win32_UI_WindowsAndMessaging", "Win32_System_Com", "Win32_System_Registry", "Win32_Foundation"] }
|
2026-05-01 08:04:35 +03:00
|
|
|
|
|
|
|
|
[patch.crates-io]
|
2026-05-22 15:25:43 +03:00
|
|
|
# Tracks HakanSeven12/acadrust main, which carries the hatch
|
2026-06-04 16:18:01 +03:00
|
|
|
# boundary-handle cap, raster-image/wipeout clip-vertex fix, 3DFACE
|
|
|
|
|
# Z-decode fix, and CANNOSCALE/CANNOSCALEVALUE header support on top of
|
|
|
|
|
# upstream. Revert to upstream once those PRs land.
|
2026-05-22 15:25:43 +03:00
|
|
|
acadrust = { git = "https://github.com/HakanSeven12/acadrust", branch = "main" }
|
2026-06-16 13:01:19 +03:00
|
|
|
|
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
2026-06-16 17:11:20 +03:00
|
|
|
rayon = "1"
|
2026-06-16 13:01:19 +03:00
|
|
|
open = "5"
|
|
|
|
|
ureq = { version = "3", default-features = false, features = ["rustls"] }
|
2026-06-16 13:16:35 +03:00
|
|
|
|
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
|
|
|
console_error_panic_hook = "0.1"
|