diff --git a/notes/project-layers.md b/notes/project-layers.md new file mode 100644 index 00000000..ef645345 --- /dev/null +++ b/notes/project-layers.md @@ -0,0 +1,8 @@ +# Project layers for Automerge-swift + +![Block diagram of the Automerge swift project layers](./project-layout.svg) + +The Automerge package intentionally holds no additional package dependencies, aside from the core Automerge library. +In Automerge, conditionally compile for platform specific dependencies (for example, `Combine`, `SwiftUI`, `CoreTransferrable`, `UniformTypeIdentifiers`) so that the package compiles cleanly in WASM. +This is "enforced" by a validation build that compiles the project using a Swift-WASM toolchain. + diff --git a/notes/project-layout.afdesign b/notes/project-layout.afdesign new file mode 100644 index 00000000..9c5663a5 Binary files /dev/null and b/notes/project-layout.afdesign differ diff --git a/notes/project-layout.svg b/notes/project-layout.svg new file mode 100644 index 00000000..54b1fd11 --- /dev/null +++ b/notes/project-layout.svg @@ -0,0 +1,112 @@ + + + + + + + + + Automerge Core (Rust) + https://github.com/automerge/automerge + + + + + + + + UDL + ./rust/src/automerge.udl + + + + + + + + Rust + ./rust + + + + + + + + + + + + + + + + + + + Automerge Swif + t + https://github.com/auto + m + erge/automerge-swift + + + Swift (generated) + ./AutomergeUniffi + + + Swift (overlay) + ./Sources/Automerge + + + Swift (Tests) + ./Tests/ + A + utomergeTests + + + Swift (util) + ./Sources/AutomergeUtilities + + + + + + + UniFFI + + + + + + + + Depends On + + + + + + XCFramework + + + + Package.swift + + + ./scripts/build-xcframework.sh + + + export LOCAL_BUILD=1 + swift build + swift test + + + cargo build + cargo fmt --manifest-path ./Cargo + . + toml + ./scripts/ci/clippy.sh + ./scripts/ci/rustfmt.sh + +