This guide helps you migrate from the old leptos-flow project to the new flow-rs project structure.
The project has been renamed from leptos-flow to flow-rs to better reflect its framework-agnostic nature and broader ecosystem potential.
| Old Name | New Name | Description |
|---|---|---|
leptos-flow-core |
flow-core |
Core data structures and algorithms |
leptos-flow-renderer |
flow-renderer |
Rendering backends |
leptos-flow-leptos |
flow-leptos |
Leptos framework integration |
leptos-flow-wasm |
flow-wasm |
WASM bindings and utilities |
leptos-flow |
flow-rs |
Main package (re-exports) |
Update your Cargo.toml dependencies:
# Old
[dependencies]
leptos-flow-core = "0.1.0"
leptos-flow-renderer = "0.1.0"
leptos-flow-leptos = "0.1.0"
# New
[dependencies]
flow-core = "0.1.0"
flow-renderer = "0.1.0"
flow-leptos = "0.1.0"Update feature names:
# Old
[features]
default = ["canvas2d", "leptos"]
canvas2d = ["leptos-flow-renderer/canvas2d"]
leptos = ["leptos-flow-leptos"]
# New
[features]
default = ["canvas2d", "leptos"]
canvas2d = ["flow-renderer/canvas2d"]
leptos = ["flow-leptos"]Update your import statements:
// Old imports
use leptos_flow_core::{Graph, Node, Edge, Position};
use leptos_flow_renderer::{Canvas2DRenderer, Renderer};
use leptos_flow_leptos::components::{FlowEditor, FlowCanvas};
// New imports
use flow_core::{Graph, Node, Edge, Position};
use flow_renderer::{Canvas2DRenderer, Renderer};
use flow_leptos::components::{FlowEditor, FlowCanvas};// Old
use leptos_flow::core::{Graph, Node, Edge};
use leptos_flow::renderer::Canvas2DRenderer;
use leptos_flow::leptos::components::FlowEditor;
// New
use flow_rs::core::{Graph, Node, Edge};
use flow_rs::renderer::Canvas2DRenderer;
use flow_rs::leptos::components::FlowEditor;If you're using the WASM bindings:
// Old
import { Graph, Node, Edge } from 'leptos-flow-wasm';
// New
import { Graph, Node, Edge } from 'flow-wasm';- All public APIs remain the same
- Only package names and import paths have changed
- No functional changes to the core API
- Feature names remain the same
- Only the underlying crate names have changed
- Update Cargo.toml: Change all
leptos-flow-*dependencies toflow-* - Update imports: Change all import statements to use new package names
- Update features: Update feature dependencies to use new crate names
- Test: Run your tests to ensure everything works correctly
- Update documentation: Update any documentation that references the old names
- The old
leptos-flowpackages will continue to work - No immediate deprecation timeline
- New features will only be available in
flow-rs
If you encounter issues during migration:
- Check this migration guide
- Review the API Reference
- Look at the examples for updated usage patterns
- Open an issue on the GitHub repository
The flow-rs project is designed to be framework-agnostic, with plans for:
flow-yew- Yew framework integrationflow-dioxus- Dioxus framework integrationflow-tauri- Tauri desktop app integration- Additional rendering backends (WebGL2, WebGPU)
This migration positions you to take advantage of these future integrations.