2026-03-22 14:56:27 +03:00
|
|
|
[package]
|
2026-05-23 17:16:15 +03:00
|
|
|
name = "OpenCADStudio"
|
2026-08-21 00:33:49 +03:00
|
|
|
version = "0.9.7"
|
2026-03-22 14:56:27 +03:00
|
|
|
edition = "2021"
|
|
|
|
|
build = "build.rs"
|
|
|
|
|
|
2026-06-15 01:36:04 +03:00
|
|
|
[workspace]
|
2026-07-11 01:27:17 +03:00
|
|
|
members = [
|
|
|
|
|
"crates/ocs_plugin_api",
|
2026-07-25 18:49:18 +03:00
|
|
|
"crates/ocs_web_worker",
|
2026-07-11 01:27:17 +03:00
|
|
|
"crates/dwg-thumbnailer",
|
|
|
|
|
"crates/dwg-thumbnailer-win",
|
|
|
|
|
]
|
2026-06-15 01:36:04 +03:00
|
|
|
|
2026-06-16 04:10:01 +03:00
|
|
|
[target.'cfg(windows)'.build-dependencies]
|
|
|
|
|
winresource = "0.1"
|
|
|
|
|
|
2026-03-22 14:56:27 +03:00
|
|
|
[dependencies]
|
2026-07-02 01:25:24 +03:00
|
|
|
serde_json = "1"
|
refactor(config): consolidate settings into one grouped settings.json
App preferences were spread across six flat plain-text files (settings.txt,
recent.txt, recent_limit.txt, statusbar.txt, ribbon.txt, plot.txt), each with a
bespoke line parser and no grouping. Replace them with a single grouped JSON,
serialized via serde (enabling the derive feature; serde_json was already a
dependency).
- New app/config.rs: AppConfig { settings, recent, statusbar, ribbon, plot } →
<config>/settings.json (pretty JSON), load()/save().
- Make UserSettings, StatusBarConfig/StatusPill, CollapseMode and
PlotDialogState serde-derived; #[serde(skip)] marks the plot dialog's runtime
fields so only print preferences persist. Their bespoke .txt load/save is
removed.
- App gains current_config/apply_config/save_config: one AppConfig::load at
startup distributes into live state; every settings-change site
(persist_settings_if_changed, recent add/remove/limit, status-bar pill
toggle, ribbon density, plot commit) routes through save_config, which diffs
against the last write to avoid thrashing.
- Clean start: the old flat files are ignored (no migration). ocad.pgp stays a
separate hand-editable file.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 16:41:34 +03:00
|
|
|
serde = { version = "1", features = ["derive"] }
|
2026-07-29 14:27:32 +03:00
|
|
|
semver = "1"
|
2026-07-30 14:47:28 +03:00
|
|
|
iced = { git = "https://github.com/iced-rs/iced.git", rev = "23604ff22ab0aad9e00b9327cb7b8546ed84db39", features = ["image", "svg", "advanced", "canvas", "smol", "markdown"] }
|
|
|
|
|
iced_core = { git = "https://github.com/iced-rs/iced.git", rev = "23604ff22ab0aad9e00b9327cb7b8546ed84db39" }
|
2026-07-31 14:48:34 +03:00
|
|
|
iced_aw = { git = "https://github.com/HakanSeven12/iced_aw.git", branch = "agent/fix-iced-fonts", features = ["menu", "context_menu", "color_picker", "drop_down"] }
|
2026-05-23 22:21:30 +03:00
|
|
|
bytemuck = { version = "1.25", features = ["derive"] }
|
|
|
|
|
glam = { version = "0.33", features = ["bytemuck"] }
|
|
|
|
|
rfd = "0.17"
|
2026-06-20 13:59:20 +03:00
|
|
|
clap = { version = "4", features = ["derive"] }
|
|
|
|
|
env_logger = "0.11"
|
2026-08-23 01:45:29 +03:00
|
|
|
acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "db73dab", features = ["serde"] }
|
|
|
|
|
cadkernel = { git = "https://github.com/HakanSeven12/cadkernel.git", rev = "895f8b7", features = ["acis", "offset"] }
|
2026-07-11 01:27:17 +03:00
|
|
|
dwg-thumbnailer = { path = "crates/dwg-thumbnailer" }
|
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-08-07 17:37:59 +03:00
|
|
|
# Rasterises assets/logo.svg into the window icon at startup, so the taskbar
|
|
|
|
|
# icon comes from the same file every other build target does. Already in the
|
|
|
|
|
# tree behind iced's svg feature; named here only to use it directly.
|
|
|
|
|
resvg = { version = "0.45", default-features = false }
|
2026-08-02 18:53:38 +03:00
|
|
|
i18n-embed = { version = "0.16", features = ["fluent-system"] }
|
|
|
|
|
i18n-embed-fl = "0.10"
|
|
|
|
|
rust-embed = "8"
|
2026-05-26 22:45:54 +03:00
|
|
|
inventory = "0.3"
|
2026-06-05 00:35:53 +03:00
|
|
|
rustc-hash = "2"
|
2026-08-03 12:47:48 +03:00
|
|
|
sha2 = "0.10"
|
2026-06-16 11:18:17 +03:00
|
|
|
fontdb = "0.23"
|
|
|
|
|
ttf-parser = "0.25"
|
|
|
|
|
cosmic-text = "0.15"
|
2026-06-25 18:17:01 +01:00
|
|
|
lyon_tessellation = "1.0.20"
|
2026-04-22 22:22:33 +03:00
|
|
|
|
2026-07-29 12:49:28 +03:00
|
|
|
[dev-dependencies]
|
|
|
|
|
naga = { version = "27", features = ["wgsl-in"] }
|
|
|
|
|
|
2026-04-22 22:22:33 +03:00
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
2026-07-25 02:58:46 +03:00
|
|
|
windows-sys = { version = "0.61", features = ["Win32_UI_Shell", "Win32_UI_WindowsAndMessaging", "Win32_System_Com", "Win32_System_Registry", "Win32_Storage_FileSystem", "Win32_Foundation"] }
|
2026-05-01 08:04:35 +03:00
|
|
|
|
2026-07-30 21:07:31 +03:00
|
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
|
|
|
ashpd = { version = "0.13.13", default-features = false, features = ["async-io", "wayland"] }
|
|
|
|
|
|
2026-05-01 08:04:35 +03:00
|
|
|
[patch.crates-io]
|
2026-07-30 14:47:28 +03:00
|
|
|
iced_core = { git = "https://github.com/iced-rs/iced.git", rev = "23604ff22ab0aad9e00b9327cb7b8546ed84db39" }
|
|
|
|
|
iced_widget = { git = "https://github.com/iced-rs/iced.git", rev = "23604ff22ab0aad9e00b9327cb7b8546ed84db39" }
|
2026-06-16 13:01:19 +03:00
|
|
|
|
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
2026-06-25 14:11:18 +03:00
|
|
|
ocs_plugin_api = { path = "crates/ocs_plugin_api", features = ["host"] }
|
2026-08-12 16:02:10 +03:00
|
|
|
meshopt = "0.6.2"
|
2026-08-02 18:53:38 +03:00
|
|
|
i18n-embed = { version = "0.16", features = ["desktop-requester"] }
|
2026-06-16 17:11:20 +03:00
|
|
|
rayon = "1"
|
2026-06-16 13:01:19 +03:00
|
|
|
open = "5"
|
2026-06-28 17:26:55 +01:00
|
|
|
printpdf = { version = "0.9.1", default-features = false }
|
2026-07-29 15:00:07 +03:00
|
|
|
ureq = { version = "3", default-features = false, features = ["rustls", "platform-verifier", "win-system-proxy"] }
|
2026-06-16 13:16:35 +03:00
|
|
|
|
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
2026-06-25 14:11:18 +03:00
|
|
|
ocs_plugin_api = { path = "crates/ocs_plugin_api" }
|
2026-08-02 18:53:38 +03:00
|
|
|
i18n-embed = { version = "0.16", features = ["web-sys-requester"] }
|
2026-08-02 23:14:48 +03:00
|
|
|
rust-embed = { version = "8", features = ["debug-embed"] }
|
2026-06-16 13:16:35 +03:00
|
|
|
console_error_panic_hook = "0.1"
|
2026-07-21 16:43:35 +03:00
|
|
|
log = "0.4"
|
2026-06-25 14:11:18 +03:00
|
|
|
getrandom = { version = "0.3", features = ["wasm_js"] }
|
2026-06-17 00:52:20 +03:00
|
|
|
wasm-bindgen = "0.2"
|
feat(web): lazy per-script font loading for international CAD text
The web build has no system-font access, so CAD text in non-Latin scripts
(Cyrillic, Greek, CJK, …) rendered as nothing — build_fallback was a hard
None on wasm (#141). Instead, ship per-script Noto subsets under web/fonts
(one alphabet per file, SIL OFL 1.1) and fetch them lazily over HTTP the
first time a drawing uses that script, then outline glyphs with ttf-parser.
- web_font: Script enum + script_of (char → script font), a per-script
store with lazy fetch, and a pending queue drained by the app loop.
- CJK is split by language (chinese/japanese/korean). Han ideographs share
code points but differ by language, so the shared block is routed by the
document's $DWGCODEPAGE (932→JP, 949→KR, GB/936→CN); kana is always
Japanese, Hangul always Korean. Re-tessellates when the language changes.
- build_fallback (wasm) outlines from the fetched subset; clear_fallback_cache
lets glyphs that missed while a font was in flight reappear on load.
- PollWebFonts subscription (web only) + WebFontLoaded message drive fetches.
- Trunk copy-dir serves web/fonts; nothing is bundled into the native binary
(desktop keeps using system fonts).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 16:13:26 +03:00
|
|
|
wasm-bindgen-futures = "0.4"
|
2026-06-17 00:52:20 +03:00
|
|
|
js-sys = "0.3"
|
2026-07-25 18:49:18 +03:00
|
|
|
bincode = "1.3"
|
2026-07-30 14:47:28 +03:00
|
|
|
web-sys = { version = "=0.3.85", features = [
|
2026-06-17 00:52:20 +03:00
|
|
|
"Window",
|
2026-07-29 00:41:51 +03:00
|
|
|
"Storage",
|
|
|
|
|
"StorageManager",
|
2026-06-17 01:33:54 +03:00
|
|
|
"Navigator",
|
2026-06-17 00:52:20 +03:00
|
|
|
"Document",
|
|
|
|
|
"Element",
|
|
|
|
|
"HtmlAnchorElement",
|
|
|
|
|
"Blob",
|
2026-07-29 00:41:51 +03:00
|
|
|
"File",
|
|
|
|
|
"FileSystemDirectoryHandle",
|
|
|
|
|
"FileSystemFileHandle",
|
|
|
|
|
"FileSystemGetDirectoryOptions",
|
|
|
|
|
"FileSystemGetFileOptions",
|
|
|
|
|
"FileSystemWritableFileStream",
|
|
|
|
|
"WritableStream",
|
2026-06-17 00:52:20 +03:00
|
|
|
"Url",
|
feat(web): lazy per-script font loading for international CAD text
The web build has no system-font access, so CAD text in non-Latin scripts
(Cyrillic, Greek, CJK, …) rendered as nothing — build_fallback was a hard
None on wasm (#141). Instead, ship per-script Noto subsets under web/fonts
(one alphabet per file, SIL OFL 1.1) and fetch them lazily over HTTP the
first time a drawing uses that script, then outline glyphs with ttf-parser.
- web_font: Script enum + script_of (char → script font), a per-script
store with lazy fetch, and a pending queue drained by the app loop.
- CJK is split by language (chinese/japanese/korean). Han ideographs share
code points but differ by language, so the shared block is routed by the
document's $DWGCODEPAGE (932→JP, 949→KR, GB/936→CN); kana is always
Japanese, Hangul always Korean. Re-tessellates when the language changes.
- build_fallback (wasm) outlines from the fetched subset; clear_fallback_cache
lets glyphs that missed while a font was in flight reappear on load.
- PollWebFonts subscription (web only) + WebFontLoaded message drive fetches.
- Trunk copy-dir serves web/fonts; nothing is bundled into the native binary
(desktop keeps using system fonts).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 16:13:26 +03:00
|
|
|
"Response",
|
2026-07-25 18:49:18 +03:00
|
|
|
"Worker",
|
|
|
|
|
"WorkerOptions",
|
|
|
|
|
"WorkerType",
|
|
|
|
|
"MessageEvent",
|
|
|
|
|
"ErrorEvent",
|
2026-06-20 17:05:02 +03:00
|
|
|
"Clipboard",
|
2026-07-22 12:47:19 +03:00
|
|
|
"KeyboardEvent",
|
|
|
|
|
"KeyboardEventInit",
|
|
|
|
|
"EventInit",
|
|
|
|
|
"EventTarget",
|
2026-07-29 22:42:04 +03:00
|
|
|
"BeforeUnloadEvent",
|
2026-07-21 16:43:35 +03:00
|
|
|
"console",
|
|
|
|
|
"Node",
|
|
|
|
|
"HtmlElement",
|
2026-06-17 00:52:20 +03:00
|
|
|
] }
|
2026-07-30 14:47:28 +03:00
|
|
|
iced = { git = "https://github.com/iced-rs/iced.git", rev = "23604ff22ab0aad9e00b9327cb7b8546ed84db39", features = ["webgl", "fira-sans"] }
|
2026-07-09 02:24:38 +03:00
|
|
|
|
|
|
|
|
[profile.release]
|
|
|
|
|
strip = true
|