fc-diff 0.1.0

Line diffing (Myers) for future-css review surfaces
Documentation
# fc-diff -- line diffing for review surfaces.
#
# Myers' O(ND) algorithm, matching src/js/diff.ts exactly. This crate is the
# algorithm *only*: it never touches the DOM, so it is safe to run in WASM and
# trivial to run natively.
#
# Deliberately free of `js-sys` and `serde-wasm-bindgen`. Every other crate in
# the workspace links them, and that single choice is what inflates each module
# to ~10x its budget: js-sys adds roughly 302 KB the moment it is used, and LTO
# cannot remove it (see Phase A in docs/PLAN.md). The crossing here is primitives
# in, primitives out -- a flat array of numbers -- so this crate should land
# under 30 KB and demonstrate the pattern the rest of the workspace needs to
# reach.

[package]
name = "fc-diff"
description = "Line diffing (Myers) for future-css review surfaces"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
wasm-bindgen = { workspace = true, optional = true }

# `no_std` on wasm (see src/lib.rs), so the allocator is named here rather than
# arriving with std. It is the same dlmalloc std would have linked.
[target.'cfg(target_arch = "wasm32")'.dependencies]
dlmalloc = { workspace = true, optional = true }

[features]
# `bindgen` exports the JavaScript boundary and is on by default, so the WASM
# build is unchanged. A pure Rust consumer (the Dioxus library) turns defaults
# off and gets the same model with no wasm-bindgen in its dependency tree.
default = ["bindgen"]
bindgen = ["dep:wasm-bindgen"]
# Build without std on wasm (see src/lib.rs). Off by default because std and a
# crate-defined panic handler cannot share a build: any std crate compiled
# alongside -- every other crate here enables wasm-bindgen's `std` -- brings
# its own handler, and the two collide. build:wasm builds the bare crates on
# their own, with this on.
bare = ["dep:dlmalloc"]