diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a25291cd3..0fb610dea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,6 +79,14 @@ jobs: - name: Run cargo fmt run: cargo fmt --all --check + - name: Install Taplo + uses: uncenter/setup-taplo@09968a8ae38d66ddd3d23802c44bf6122d7aa991 # v1 + with: + version: "0.9.3" + + - name: Run taplo fmt + run: taplo fmt --check --diff + - name: Install ripgrep run: | sudo apt update diff --git a/.taplo.toml b/.taplo.toml new file mode 100644 index 000000000..f01304619 --- /dev/null +++ b/.taplo.toml @@ -0,0 +1,11 @@ +# See https://taplo.tamasfe.dev/configuration/file.html +# and https://taplo.tamasfe.dev/configuration/formatter-options.html + +[formatting] +# Aligning comments with the largest line creates +# diff noise when neighboring lines are changed. +align_comments = false + +# Matches how rustfmt formats Rust code +column_width = 100 +indent_string = " " diff --git a/Cargo.toml b/Cargo.toml index 4924394cf..51c3a09d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,10 +35,7 @@ homepage = "https://xilem.dev/" rust.unsafe_code = "deny" # Intentional break from the lint set. Intended to be temporary -rust.unexpected_cfgs = { level = "warn", check-cfg = [ - 'cfg(FALSE)', - 'cfg(tarpaulin_include)', -] } +rust.unexpected_cfgs = { level = "warn", check-cfg = ['cfg(FALSE)', 'cfg(tarpaulin_include)'] } # LINEBENDER LINT SET - Cargo.toml - v2 # See https://linebender.org/wiki/canonical-lints/ diff --git a/xilem/Cargo.toml b/xilem/Cargo.toml index 8acbb7a22..dc60c831a 100644 --- a/xilem/Cargo.toml +++ b/xilem/Cargo.toml @@ -89,12 +89,7 @@ tracing.workspace = true vello.workspace = true smallvec.workspace = true accesskit.workspace = true -tokio = { version = "1.39.1", features = [ - "rt", - "rt-multi-thread", - "time", - "sync", -] } +tokio = { version = "1.39.1", features = ["rt", "rt-multi-thread", "time", "sync"] } [dev-dependencies] # Used for `variable_clock` diff --git a/xilem_web/Cargo.toml b/xilem_web/Cargo.toml index 54b21a116..600af196c 100644 --- a/xilem_web/Cargo.toml +++ b/xilem_web/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" description = "HTML DOM frontend for the Xilem Rust UI framework." keywords = ["xilem", "html", "svg", "dom", "web", "ui"] categories = ["gui", "web-programming"] -publish = false # Until it's ready +publish = false # Until it's ready edition.workspace = true license.workspace = true repository.workspace = true @@ -30,152 +30,152 @@ xilem_core = { workspace = true, features = ["kurbo"] } [dependencies.web-sys] version = "0.3.69" features = [ - "console", - "CssStyleDeclaration", - "Document", - "DocumentFragment", - "DomTokenList", - "Element", - "Event", - "AddEventListenerOptions", - "HtmlElement", - "Node", - "NodeList", - "ResizeObserver", - "ResizeObserverEntry", - "DomRectReadOnly", - "MathMlElement", - "SvgElement", - "SvgaElement", - "SvgAnimateElement", - "SvgAnimateMotionElement", - "SvgAnimateTransformElement", - "SvgCircleElement", - "SvgClipPathElement", - "SvgDefsElement", - "SvgDescElement", - "SvgEllipseElement", - "SvgfeBlendElement", - "SvgfeColorMatrixElement", - "SvgfeComponentTransferElement", - "SvgfeCompositeElement", - "SvgfeConvolveMatrixElement", - "SvgfeDiffuseLightingElement", - "SvgfeDisplacementMapElement", - "SvgfeDistantLightElement", - "SvgfeDropShadowElement", - "SvgfeFloodElement", - "SvgfeFuncAElement", - "SvgfeFuncBElement", - "SvgfeFuncGElement", - "SvgfeFuncRElement", - "SvgfeGaussianBlurElement", - "SvgfeImageElement", - "SvgfeMergeElement", - "SvgfeMergeNodeElement", - "SvgfeMorphologyElement", - "SvgfeOffsetElement", - "SvgfePointLightElement", - "SvgfeSpecularLightingElement", - "SvgfeSpotLightElement", - "SvgfeTileElement", - "SvgfeTurbulenceElement", - "SvgFilterElement", - "SvgForeignObjectElement", - "SvggElement", - # "SvgHatchElement", - # "SvgHatchpathElement", - "SvgImageElement", - "SvgLineElement", - "SvgLinearGradientElement", - "SvgMarkerElement", - "SvgMaskElement", - "SvgMetadataElement", - "SvgmPathElement", - "SvgPathElement", - "SvgPatternElement", - "SvgPolygonElement", - "SvgPolylineElement", - "SvgRadialGradientElement", - "SvgRectElement", - "SvgScriptElement", - "SvgSetElement", - "SvgStopElement", - "SvgStyleElement", - "SvgsvgElement", - "SvgSwitchElement", - "SvgSymbolElement", - "SvgTextElement", - "SvgTextPathElement", - "SvgTitleElement", - "SvgtSpanElement", - "SvgUseElement", - "SvgViewElement", - "Text", - "Window", - "FocusEvent", - "HtmlInputElement", - "InputEvent", - "KeyboardEvent", - "MouseEvent", - "PointerEvent", - "WheelEvent", - "HtmlAnchorElement", - "HtmlAreaElement", - "HtmlAudioElement", - "HtmlBrElement", - "HtmlButtonElement", - "HtmlCanvasElement", - "HtmlDataElement", - "HtmlDataListElement", - "HtmlDetailsElement", - "HtmlDialogElement", - "HtmlDivElement", - "HtmlDListElement", - "HtmlEmbedElement", - "HtmlFieldSetElement", - "HtmlFormElement", - "HtmlHeadingElement", - "HtmlHrElement", - "HtmlIFrameElement", - "HtmlImageElement", - "HtmlInputElement", - "HtmlLabelElement", - "HtmlLegendElement", - "HtmlLiElement", - "HtmlLinkElement", - "HtmlMapElement", - "HtmlMediaElement", - "HtmlMenuElement", - "HtmlMeterElement", - "HtmlModElement", - "HtmlObjectElement", - "HtmlOListElement", - "HtmlOptGroupElement", - "HtmlOptionElement", - "HtmlOutputElement", - "HtmlParagraphElement", - "HtmlPictureElement", - "HtmlPreElement", - "HtmlProgressElement", - "HtmlQuoteElement", - "HtmlScriptElement", - "HtmlSelectElement", - "HtmlSlotElement", - "HtmlSourceElement", - "HtmlSpanElement", - "HtmlTableCaptionElement", - "HtmlTableCellElement", - "HtmlTableColElement", - "HtmlTableElement", - "HtmlTableRowElement", - "HtmlTableSectionElement", - "HtmlTemplateElement", - "HtmlTimeElement", - "HtmlTextAreaElement", - "HtmlTrackElement", - "HtmlUListElement", - "HtmlVideoElement", + "console", + "CssStyleDeclaration", + "Document", + "DocumentFragment", + "DomTokenList", + "Element", + "Event", + "AddEventListenerOptions", + "HtmlElement", + "Node", + "NodeList", + "ResizeObserver", + "ResizeObserverEntry", + "DomRectReadOnly", + "MathMlElement", + "SvgElement", + "SvgaElement", + "SvgAnimateElement", + "SvgAnimateMotionElement", + "SvgAnimateTransformElement", + "SvgCircleElement", + "SvgClipPathElement", + "SvgDefsElement", + "SvgDescElement", + "SvgEllipseElement", + "SvgfeBlendElement", + "SvgfeColorMatrixElement", + "SvgfeComponentTransferElement", + "SvgfeCompositeElement", + "SvgfeConvolveMatrixElement", + "SvgfeDiffuseLightingElement", + "SvgfeDisplacementMapElement", + "SvgfeDistantLightElement", + "SvgfeDropShadowElement", + "SvgfeFloodElement", + "SvgfeFuncAElement", + "SvgfeFuncBElement", + "SvgfeFuncGElement", + "SvgfeFuncRElement", + "SvgfeGaussianBlurElement", + "SvgfeImageElement", + "SvgfeMergeElement", + "SvgfeMergeNodeElement", + "SvgfeMorphologyElement", + "SvgfeOffsetElement", + "SvgfePointLightElement", + "SvgfeSpecularLightingElement", + "SvgfeSpotLightElement", + "SvgfeTileElement", + "SvgfeTurbulenceElement", + "SvgFilterElement", + "SvgForeignObjectElement", + "SvggElement", + # "SvgHatchElement", + # "SvgHatchpathElement", + "SvgImageElement", + "SvgLineElement", + "SvgLinearGradientElement", + "SvgMarkerElement", + "SvgMaskElement", + "SvgMetadataElement", + "SvgmPathElement", + "SvgPathElement", + "SvgPatternElement", + "SvgPolygonElement", + "SvgPolylineElement", + "SvgRadialGradientElement", + "SvgRectElement", + "SvgScriptElement", + "SvgSetElement", + "SvgStopElement", + "SvgStyleElement", + "SvgsvgElement", + "SvgSwitchElement", + "SvgSymbolElement", + "SvgTextElement", + "SvgTextPathElement", + "SvgTitleElement", + "SvgtSpanElement", + "SvgUseElement", + "SvgViewElement", + "Text", + "Window", + "FocusEvent", + "HtmlInputElement", + "InputEvent", + "KeyboardEvent", + "MouseEvent", + "PointerEvent", + "WheelEvent", + "HtmlAnchorElement", + "HtmlAreaElement", + "HtmlAudioElement", + "HtmlBrElement", + "HtmlButtonElement", + "HtmlCanvasElement", + "HtmlDataElement", + "HtmlDataListElement", + "HtmlDetailsElement", + "HtmlDialogElement", + "HtmlDivElement", + "HtmlDListElement", + "HtmlEmbedElement", + "HtmlFieldSetElement", + "HtmlFormElement", + "HtmlHeadingElement", + "HtmlHrElement", + "HtmlIFrameElement", + "HtmlImageElement", + "HtmlInputElement", + "HtmlLabelElement", + "HtmlLegendElement", + "HtmlLiElement", + "HtmlLinkElement", + "HtmlMapElement", + "HtmlMediaElement", + "HtmlMenuElement", + "HtmlMeterElement", + "HtmlModElement", + "HtmlObjectElement", + "HtmlOListElement", + "HtmlOptGroupElement", + "HtmlOptionElement", + "HtmlOutputElement", + "HtmlParagraphElement", + "HtmlPictureElement", + "HtmlPreElement", + "HtmlProgressElement", + "HtmlQuoteElement", + "HtmlScriptElement", + "HtmlSelectElement", + "HtmlSlotElement", + "HtmlSourceElement", + "HtmlSpanElement", + "HtmlTableCaptionElement", + "HtmlTableCellElement", + "HtmlTableColElement", + "HtmlTableElement", + "HtmlTableRowElement", + "HtmlTableSectionElement", + "HtmlTemplateElement", + "HtmlTimeElement", + "HtmlTextAreaElement", + "HtmlTrackElement", + "HtmlUListElement", + "HtmlVideoElement", ] [features]