9 个版本 (重大更改)

0.8.0 2024 年 8 月 10 日
0.7.0 2024 年 6 月 30 日
0.6.0 2024 年 6 月 9 日
0.5.0 2024 年 3 月 30 日
0.1.0 2024 年 2 月 4 日

#59 in 可视化

Download history 21/week @ 2024-05-20 32/week @ 2024-05-27 196/week @ 2024-06-03 32/week @ 2024-06-10 130/week @ 2024-06-24 95/week @ 2024-07-01 46/week @ 2024-07-29 118/week @ 2024-08-05 23/week @ 2024-08-12

每月下载 187
dot_ix_playground 中使用

MIT/Apache

300KB
3.5K SLoC

✒️ dot_ix

Crates.io docs.rs CI Coverage Status

🚧 这是一个仍在进行中的项目

自己试试:(demo_1, demo_2)

示例

原始概念

https://user-images.githubusercontent.com/2993230/253878816-0729970f-651f-45ef-a986-470f383b8018.mp4

用法

将以下内容添加到 Cargo.toml

dot_ix = "0.8.0"

# Enables the `FlexDiag` web component.
dot_ix = { version = "0.8.0", features = ["flex_diag"] }

# Enables server side dot generation.
# Requires graphviz `dot` to be installed server side.
dot_ix = { version = "0.8.0", features = ["server_side_graphviz"] }

开发

cargo install cargo-leptos

# Then, one of:
# * client side rendering -- uses WASM compiled graphviz to generate the graph.
cargo leptos watch
# * server side rendering -- runs `dot` on the server to generate the graph.
#   Requires `graphviz` to be installed.
cargo leptos watch --features "server_side_graphviz" -v

对于服务器端渲染,需要单独传递 "server_side_graphviz" 功能,因为该功能还需要启用库的编译,即。

  • 服务器端渲染
    • 库功能:"server_side_graphviz"
    • 二进制功能:"ssr,server_side_graphviz"
  • 客户端渲染
    • 库功能:""
    • 二进制功能:""

待办事项

🦜 随意进行以下任何一项 -- 这个项目不是我的主要关注点,但我应该会在审查/合并事项时做出回应。

  • 将crate拆分为多个子crate。
  • app::info_graph::InfoGraph拆分为更小的组件。
  • 删除main.scss并用tailwind类替换。
  • 在SVG中内联样式。
  • 在SVG样式中内联字体。
  • rt/into_graphviz_dot_src/info_graph.rs改为写入缓冲区,而不是单个字符串。
  • 取具有“类型”的每个节点。
  • 取尾windcss类以附加到节点类型。
  • 取主题/与默认主题合并。
  • dot_ix库从Web应用程序中拆分出来,以便可以嵌入到其他应用程序中。
  • GitHub Actions / 自动化测试 / 发布 / 发布。
  • 沙箱:渲染预写的图。
    • URL中的图。
    • 链接到gist。

依赖项

~1–16MB
~225K SLoC