From 8e994a954ee41d918d34ff4fa48d45eaf56c3b7f Mon Sep 17 00:00:00 2001 From: appflowy Date: Sat, 20 Nov 2021 10:52:39 +0800 Subject: [PATCH] add shared-lib folder --- backend/Cargo.toml | 18 +++++++----------- frontend/rust-lib/Cargo.toml | 14 +++----------- frontend/rust-lib/dart-ffi/Cargo.toml | 5 +++-- frontend/rust-lib/dart-notify/Cargo.toml | 2 +- frontend/rust-lib/flowy-document/Cargo.toml | 13 +++++++------ frontend/rust-lib/flowy-sdk/Cargo.toml | 11 +++++++---- frontend/rust-lib/flowy-test/Cargo.toml | 10 ++++++---- frontend/rust-lib/flowy-user/Cargo.toml | 15 ++++++++------- frontend/rust-lib/flowy-workspace/Cargo.toml | 19 +++++++++++-------- frontend/rust-lib/lib-infra/Cargo.toml | 2 +- frontend/scripts/flowy-tool/Cargo.toml | 2 +- shared-lib/Cargo.toml | 14 ++++++++++++++ .../backend-service/Cargo.toml | 0 .../backend-service/src/config.rs | 0 .../backend-service/src/errors.rs | 0 .../backend-service/src/lib.rs | 0 .../backend-service/src/middleware.rs | 0 .../backend-service/src/request/mod.rs | 0 .../backend-service/src/request/request.rs | 0 .../backend-service/src/response/mod.rs | 0 .../backend-service/src/response/response.rs | 0 .../src/response/response_http.rs | 0 .../backend-service/src/user_request.rs | 0 .../backend-service/src/workspace_request.rs | 0 .../flowy-ast/Cargo.toml | 0 .../flowy-ast/src/ast.rs | 0 .../flowy-ast/src/attr.rs | 0 .../flowy-ast/src/ctxt.rs | 0 .../flowy-ast/src/event_ast.rs | 0 .../flowy-ast/src/lib.rs | 0 .../flowy-ast/src/symbol.rs | 0 .../flowy-ast/src/ty_ext.rs | 0 .../flowy-derive/.gitignore | 0 .../flowy-derive/Cargo.toml | 0 .../flowy-derive/src/dart_event/mod.rs | 0 .../src/derive_cache/derive_cache.rs | 0 .../flowy-derive/src/derive_cache/mod.rs | 0 .../flowy-derive/src/lib.rs | 0 .../flowy-derive/src/proto_buf/deserialize.rs | 0 .../flowy-derive/src/proto_buf/enum_serde.rs | 0 .../flowy-derive/src/proto_buf/mod.rs | 0 .../flowy-derive/src/proto_buf/serialize.rs | 0 .../flowy-derive/src/proto_buf/util.rs | 0 .../flowy-derive/tests/progress.rs | 0 .../flowy-document-infra/Cargo.toml | 0 .../flowy-document-infra/Flowy.toml | 0 .../flowy-document-infra/src/READ_ME.json | 0 .../flowy-document-infra/src/core/data.rs | 0 .../flowy-document-infra/src/core/document.rs | 0 .../core/extensions/delete/default_delete.rs | 0 .../src/core/extensions/delete/mod.rs | 0 .../delete/preserve_line_format_merge.rs | 0 .../extensions/format/format_at_position.rs | 0 .../src/core/extensions/format/helper.rs | 0 .../src/core/extensions/format/mod.rs | 0 .../extensions/format/resolve_block_format.rs | 0 .../format/resolve_inline_format.rs | 0 .../core/extensions/insert/auto_exit_block.rs | 0 .../src/core/extensions/insert/auto_format.rs | 0 .../core/extensions/insert/default_insert.rs | 0 .../src/core/extensions/insert/mod.rs | 0 .../insert/preserve_block_format.rs | 0 .../insert/preserve_inline_format.rs | 0 .../insert/reset_format_on_new_line.rs | 0 .../src/core/extensions/mod.rs | 0 .../flowy-document-infra/src/core/history.rs | 0 .../flowy-document-infra/src/core/mod.rs | 0 .../flowy-document-infra/src/core/view.rs | 0 .../src/entities/doc/doc.rs | 0 .../src/entities/doc/mod.rs | 0 .../src/entities/doc/parser/doc_id.rs | 0 .../src/entities/doc/parser/mod.rs | 0 .../src/entities/doc/revision.rs | 0 .../flowy-document-infra/src/entities/mod.rs | 0 .../src/entities/ws/mod.rs | 0 .../src/entities/ws/ws.rs | 0 .../flowy-document-infra/src/errors.rs | 0 .../flowy-document-infra/src/lib.rs | 0 .../flowy-document-infra/src/protobuf/mod.rs | 0 .../src/protobuf/model/doc.rs | 0 .../src/protobuf/model/mod.rs | 0 .../src/protobuf/model/revision.rs | 0 .../src/protobuf/model/ws.rs | 0 .../src/protobuf/proto/doc.proto | 0 .../src/protobuf/proto/revision.proto | 0 .../src/protobuf/proto/ws.proto | 0 .../flowy-document-infra/src/user_default.rs | 0 .../flowy-document-infra/src/util.rs | 0 .../flowy-user-infra/Cargo.toml | 0 .../flowy-user-infra/Flowy.toml | 0 .../flowy-user-infra/src/entities/auth.rs | 0 .../flowy-user-infra/src/entities/mod.rs | 0 .../src/entities/user_profile.rs | 0 .../flowy-user-infra/src/errors.rs | 0 .../flowy-user-infra/src/lib.rs | 0 .../flowy-user-infra/src/parser/mod.rs | 0 .../flowy-user-infra/src/parser/user_email.rs | 0 .../flowy-user-infra/src/parser/user_id.rs | 0 .../flowy-user-infra/src/parser/user_name.rs | 0 .../src/parser/user_password.rs | 0 .../src/parser/user_workspace.rs | 0 .../flowy-user-infra/src/protobuf/mod.rs | 0 .../src/protobuf/model/auth.rs | 0 .../src/protobuf/model/errors.rs | 0 .../src/protobuf/model/mod.rs | 0 .../src/protobuf/model/user_profile.rs | 0 .../src/protobuf/proto/auth.proto | 0 .../src/protobuf/proto/errors.proto | 0 .../src/protobuf/proto/user_profile.proto | 0 .../flowy-user-infra/src/user_default.rs | 0 .../flowy-workspace-infra/Cargo.toml | 0 .../flowy-workspace-infra/Flowy.toml | 0 .../src/entities/app/app_create.rs | 0 .../src/entities/app/app_query.rs | 0 .../src/entities/app/app_update.rs | 0 .../src/entities/app/mod.rs | 0 .../flowy-workspace-infra/src/entities/mod.rs | 0 .../src/entities/share/export.rs | 0 .../src/entities/share/mod.rs | 0 .../src/entities/trash/mod.rs | 0 .../src/entities/trash/trash_create.rs | 0 .../src/entities/view/mod.rs | 0 .../src/entities/view/view_create.rs | 0 .../src/entities/view/view_query.rs | 0 .../src/entities/view/view_update.rs | 0 .../src/entities/workspace/mod.rs | 0 .../entities/workspace/workspace_create.rs | 0 .../src/entities/workspace/workspace_query.rs | 0 .../entities/workspace/workspace_setting.rs | 0 .../entities/workspace/workspace_update.rs | 0 .../flowy-workspace-infra/src/errors.rs | 0 .../flowy-workspace-infra/src/lib.rs | 0 .../flowy-workspace-infra/src/macros.rs | 0 .../src/parser/app/app_color_style.rs | 0 .../src/parser/app/app_desc.rs | 0 .../src/parser/app/app_id.rs | 0 .../src/parser/app/app_name.rs | 0 .../src/parser/app/mod.rs | 0 .../flowy-workspace-infra/src/parser/mod.rs | 0 .../src/parser/trash/mod.rs | 0 .../src/parser/trash/trash_id.rs | 0 .../src/parser/view/delta_data.rs | 0 .../src/parser/view/mod.rs | 0 .../src/parser/view/view_desc.rs | 0 .../src/parser/view/view_id.rs | 0 .../src/parser/view/view_name.rs | 0 .../src/parser/view/view_thumbnail.rs | 0 .../src/parser/workspace/mod.rs | 0 .../src/parser/workspace/workspace_desc.rs | 0 .../src/parser/workspace/workspace_id.rs | 0 .../src/parser/workspace/workspace_name.rs | 0 .../flowy-workspace-infra/src/protobuf/mod.rs | 0 .../src/protobuf/model/app_create.rs | 0 .../src/protobuf/model/app_query.rs | 0 .../src/protobuf/model/app_update.rs | 0 .../src/protobuf/model/errors.rs | 0 .../src/protobuf/model/export.rs | 0 .../src/protobuf/model/mod.rs | 0 .../src/protobuf/model/trash_create.rs | 0 .../src/protobuf/model/view_create.rs | 0 .../src/protobuf/model/view_query.rs | 0 .../src/protobuf/model/view_update.rs | 0 .../src/protobuf/model/workspace_create.rs | 0 .../src/protobuf/model/workspace_query.rs | 0 .../src/protobuf/model/workspace_setting.rs | 0 .../src/protobuf/model/workspace_update.rs | 0 .../src/protobuf/proto/app_create.proto | 0 .../src/protobuf/proto/app_query.proto | 0 .../src/protobuf/proto/app_update.proto | 0 .../src/protobuf/proto/errors.proto | 0 .../src/protobuf/proto/export.proto | 0 .../src/protobuf/proto/trash_create.proto | 0 .../src/protobuf/proto/view_create.proto | 0 .../src/protobuf/proto/view_query.proto | 0 .../src/protobuf/proto/view_update.proto | 0 .../src/protobuf/proto/workspace_create.proto | 0 .../src/protobuf/proto/workspace_query.proto | 0 .../protobuf/proto/workspace_setting.proto | 0 .../src/protobuf/proto/workspace_update.proto | 0 .../flowy-workspace-infra/src/user_default.rs | 0 .../rust-lib => shared-lib}/lib-ot/Cargo.toml | 0 .../lib-ot/src/core/attributes/attribute.rs | 0 .../lib-ot/src/core/attributes/attributes.rs | 0 .../src/core/attributes/attributes_serde.rs | 0 .../lib-ot/src/core/attributes/builder.rs | 0 .../lib-ot/src/core/attributes/macros.rs | 0 .../lib-ot/src/core/attributes/mod.rs | 0 .../lib-ot/src/core/delta/builder.rs | 0 .../lib-ot/src/core/delta/cursor.rs | 0 .../lib-ot/src/core/delta/delta.rs | 0 .../lib-ot/src/core/delta/delta_serde.rs | 0 .../lib-ot/src/core/delta/iterator.rs | 0 .../lib-ot/src/core/delta/mod.rs | 0 .../lib-ot/src/core/flowy_str.rs | 0 .../lib-ot/src/core/interval.rs | 0 .../lib-ot/src/core/mod.rs | 0 .../lib-ot/src/core/operation/builder.rs | 0 .../lib-ot/src/core/operation/mod.rs | 0 .../lib-ot/src/core/operation/operation.rs | 0 .../src/core/operation/operation_serde.rs | 0 .../lib-ot/src/errors.rs | 0 .../rust-lib => shared-lib}/lib-ot/src/lib.rs | 0 .../rust-lib => shared-lib}/lib-ws/Cargo.toml | 2 +- .../rust-lib => shared-lib}/lib-ws/Flowy.toml | 0 .../lib-ws/src/connect.rs | 0 .../lib-ws/src/errors.rs | 0 .../rust-lib => shared-lib}/lib-ws/src/lib.rs | 0 .../rust-lib => shared-lib}/lib-ws/src/msg.rs | 0 .../lib-ws/src/protobuf/mod.rs | 0 .../lib-ws/src/protobuf/model/errors.rs | 0 .../lib-ws/src/protobuf/model/mod.rs | 0 .../lib-ws/src/protobuf/model/msg.rs | 0 .../lib-ws/src/protobuf/proto/errors.proto | 0 .../lib-ws/src/protobuf/proto/msg.proto | 0 .../rust-lib => shared-lib}/lib-ws/src/ws.rs | 0 shared-lib/rust-toolchain | 4 ++++ shared-lib/rustfmt.toml | 18 ++++++++++++++++++ 217 files changed, 92 insertions(+), 57 deletions(-) create mode 100644 shared-lib/Cargo.toml rename {frontend/rust-lib => shared-lib}/backend-service/Cargo.toml (100%) rename {frontend/rust-lib => shared-lib}/backend-service/src/config.rs (100%) rename {frontend/rust-lib => shared-lib}/backend-service/src/errors.rs (100%) rename {frontend/rust-lib => shared-lib}/backend-service/src/lib.rs (100%) rename {frontend/rust-lib => shared-lib}/backend-service/src/middleware.rs (100%) rename {frontend/rust-lib => shared-lib}/backend-service/src/request/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/backend-service/src/request/request.rs (100%) rename {frontend/rust-lib => shared-lib}/backend-service/src/response/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/backend-service/src/response/response.rs (100%) rename {frontend/rust-lib => shared-lib}/backend-service/src/response/response_http.rs (100%) rename {frontend/rust-lib => shared-lib}/backend-service/src/user_request.rs (100%) rename {frontend/rust-lib => shared-lib}/backend-service/src/workspace_request.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-ast/Cargo.toml (100%) rename {frontend/rust-lib => shared-lib}/flowy-ast/src/ast.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-ast/src/attr.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-ast/src/ctxt.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-ast/src/event_ast.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-ast/src/lib.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-ast/src/symbol.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-ast/src/ty_ext.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-derive/.gitignore (100%) rename {frontend/rust-lib => shared-lib}/flowy-derive/Cargo.toml (100%) rename {frontend/rust-lib => shared-lib}/flowy-derive/src/dart_event/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-derive/src/derive_cache/derive_cache.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-derive/src/derive_cache/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-derive/src/lib.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-derive/src/proto_buf/deserialize.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-derive/src/proto_buf/enum_serde.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-derive/src/proto_buf/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-derive/src/proto_buf/serialize.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-derive/src/proto_buf/util.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-derive/tests/progress.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/Cargo.toml (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/Flowy.toml (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/READ_ME.json (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/data.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/document.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/extensions/delete/default_delete.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/extensions/delete/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/extensions/delete/preserve_line_format_merge.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/extensions/format/format_at_position.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/extensions/format/helper.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/extensions/format/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/extensions/format/resolve_block_format.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/extensions/format/resolve_inline_format.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/extensions/insert/auto_exit_block.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/extensions/insert/auto_format.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/extensions/insert/default_insert.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/extensions/insert/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/extensions/insert/preserve_block_format.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/extensions/insert/preserve_inline_format.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/extensions/insert/reset_format_on_new_line.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/extensions/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/history.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/core/view.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/entities/doc/doc.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/entities/doc/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/entities/doc/parser/doc_id.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/entities/doc/parser/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/entities/doc/revision.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/entities/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/entities/ws/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/entities/ws/ws.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/errors.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/lib.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/protobuf/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/protobuf/model/doc.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/protobuf/model/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/protobuf/model/revision.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/protobuf/model/ws.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/protobuf/proto/doc.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/protobuf/proto/revision.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/protobuf/proto/ws.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/user_default.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-document-infra/src/util.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/Cargo.toml (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/Flowy.toml (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/entities/auth.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/entities/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/entities/user_profile.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/errors.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/lib.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/parser/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/parser/user_email.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/parser/user_id.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/parser/user_name.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/parser/user_password.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/parser/user_workspace.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/protobuf/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/protobuf/model/auth.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/protobuf/model/errors.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/protobuf/model/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/protobuf/model/user_profile.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/protobuf/proto/auth.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/protobuf/proto/errors.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/protobuf/proto/user_profile.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-user-infra/src/user_default.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/Cargo.toml (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/Flowy.toml (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/app/app_create.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/app/app_query.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/app/app_update.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/app/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/share/export.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/share/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/trash/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/trash/trash_create.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/view/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/view/view_create.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/view/view_query.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/view/view_update.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/workspace/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/workspace/workspace_create.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/workspace/workspace_query.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/workspace/workspace_setting.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/entities/workspace/workspace_update.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/errors.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/lib.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/macros.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/app/app_color_style.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/app/app_desc.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/app/app_id.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/app/app_name.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/app/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/trash/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/trash/trash_id.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/view/delta_data.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/view/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/view/view_desc.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/view/view_id.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/view/view_name.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/view/view_thumbnail.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/workspace/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/workspace/workspace_desc.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/workspace/workspace_id.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/parser/workspace/workspace_name.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/model/app_create.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/model/app_query.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/model/app_update.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/model/errors.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/model/export.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/model/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/model/trash_create.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/model/view_create.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/model/view_query.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/model/view_update.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/model/workspace_create.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/model/workspace_query.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/model/workspace_setting.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/model/workspace_update.rs (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/proto/app_create.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/proto/app_query.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/proto/app_update.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/proto/errors.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/proto/export.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/proto/trash_create.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/proto/view_create.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/proto/view_query.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/proto/view_update.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/proto/workspace_create.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/proto/workspace_query.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/proto/workspace_setting.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/protobuf/proto/workspace_update.proto (100%) rename {frontend/rust-lib => shared-lib}/flowy-workspace-infra/src/user_default.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/Cargo.toml (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/attributes/attribute.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/attributes/attributes.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/attributes/attributes_serde.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/attributes/builder.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/attributes/macros.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/attributes/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/delta/builder.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/delta/cursor.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/delta/delta.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/delta/delta_serde.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/delta/iterator.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/delta/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/flowy_str.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/interval.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/operation/builder.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/operation/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/operation/operation.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/core/operation/operation_serde.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/errors.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ot/src/lib.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ws/Cargo.toml (93%) rename {frontend/rust-lib => shared-lib}/lib-ws/Flowy.toml (100%) rename {frontend/rust-lib => shared-lib}/lib-ws/src/connect.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ws/src/errors.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ws/src/lib.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ws/src/msg.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ws/src/protobuf/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ws/src/protobuf/model/errors.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ws/src/protobuf/model/mod.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ws/src/protobuf/model/msg.rs (100%) rename {frontend/rust-lib => shared-lib}/lib-ws/src/protobuf/proto/errors.proto (100%) rename {frontend/rust-lib => shared-lib}/lib-ws/src/protobuf/proto/msg.proto (100%) rename {frontend/rust-lib => shared-lib}/lib-ws/src/ws.rs (100%) create mode 100644 shared-lib/rust-toolchain create mode 100644 shared-lib/rustfmt.toml diff --git a/backend/Cargo.toml b/backend/Cargo.toml index e7c36a3b3d..85f29ecd99 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -40,7 +40,6 @@ serde = { version = "1.0", features = ["derive"] } serde_repr = "0.1" serde-aux = "1.0.1" - derive_more = {version = "0.99"} protobuf = {version = "2.20.0"} uuid = { version = "0.8", features = ["serde", "v4"] } @@ -60,12 +59,12 @@ pin-project = "1.0.0" byteorder = {version = "1.3.4"} async-stream = "0.3.2" -flowy-user-infra = { path = "../frontend/rust-lib/flowy-user-infra" } -flowy-workspace-infra = { path = "../frontend/rust-lib/flowy-workspace-infra" } -flowy-document-infra = { path = "../frontend/rust-lib/flowy-document-infra" } -lib-ws = { path = "../frontend/rust-lib/lib-ws" } -lib-ot = { path = "../frontend/rust-lib/lib-ot" } -backend-service = { path = "../frontend/rust-lib/backend-service", features = ["http_server"] } +flowy-user-infra = { path = "../shared-lib/flowy-user-infra" } +flowy-workspace-infra = { path = "../shared-lib/flowy-workspace-infra" } +flowy-document-infra = { path = "../shared-lib/flowy-document-infra" } +lib-ws = { path = "../shared-lib/lib-ws" } +lib-ot = { path = "../shared-lib/lib-ot" } +backend-service = { path = "../shared-lib/backend-service", features = ["http_server"] } ormx = { version = "0.7", features = ["postgres"]} [dependencies.sqlx] @@ -104,8 +103,5 @@ backend = { path = ".", features = ["flowy_test"]} flowy-sdk = { path = "../frontend/rust-lib/flowy-sdk", features = ["http_server"] } flowy-user = { path = "../frontend/rust-lib/flowy-user", features = ["http_server"] } flowy-document = { path = "../frontend/rust-lib/flowy-document", features = ["flowy_test", "http_server"] } -lib-ws = { path = "../frontend/rust-lib/lib-ws" } flowy-test = { path = "../frontend/rust-lib/flowy-test" } -lib-infra = { path = "../frontend/rust-lib/lib-infra" } -lib-ot = { path = "../frontend/rust-lib/lib-ot" } -lib-sqlite = { path = "../frontend/rust-lib/lib-sqlite" } + diff --git a/frontend/rust-lib/Cargo.toml b/frontend/rust-lib/Cargo.toml index 40fe2cd676..1b7923a4cb 100644 --- a/frontend/rust-lib/Cargo.toml +++ b/frontend/rust-lib/Cargo.toml @@ -1,25 +1,17 @@ [workspace] members = [ "lib-dispatch", + "lib-log", + "lib-sqlite", + "lib-infra", "flowy-sdk", "dart-ffi", - "lib-log", "flowy-user", - "flowy-user-infra", - "flowy-ast", - "flowy-derive", "flowy-test", - "lib-sqlite", "flowy-database", - "lib-infra", "flowy-workspace", - "flowy-workspace-infra", "dart-notify", "flowy-document", - "flowy-document-infra", - "lib-ot", - "lib-ws", - "backend-service", ] exclude = ["../backend"] diff --git a/frontend/rust-lib/dart-ffi/Cargo.toml b/frontend/rust-lib/dart-ffi/Cargo.toml index bc67e11ad1..f2870885a0 100644 --- a/frontend/rust-lib/dart-ffi/Cargo.toml +++ b/frontend/rust-lib/dart-ffi/Cargo.toml @@ -26,9 +26,10 @@ parking_lot = "0.11" lib-dispatch = {path = "../lib-dispatch" } flowy-sdk = {path = "../flowy-sdk"} -flowy-derive = {path = "../flowy-derive"} dart-notify = {path = "../dart-notify" } -backend-service = { path = "../backend-service" } + +flowy-derive = {path = "../../../shared-lib/flowy-derive" } +backend-service = { path = "../../../shared-lib/backend-service" } [features] diff --git a/frontend/rust-lib/dart-notify/Cargo.toml b/frontend/rust-lib/dart-notify/Cargo.toml index aa25f0e9f9..d334f8eaf9 100644 --- a/frontend/rust-lib/dart-notify/Cargo.toml +++ b/frontend/rust-lib/dart-notify/Cargo.toml @@ -12,7 +12,7 @@ allo-isolate = {version = "^0.1", features = ["catch-unwind",]} log = "0.4.14" bytes = { version = "1.0" } -flowy-derive = {path = "../flowy-derive"} +flowy-derive = {path = "../../../shared-lib/flowy-derive" } lib-dispatch = {path = "../lib-dispatch" } [features] diff --git a/frontend/rust-lib/flowy-document/Cargo.toml b/frontend/rust-lib/flowy-document/Cargo.toml index 07862cd19e..f7985d871f 100644 --- a/frontend/rust-lib/flowy-document/Cargo.toml +++ b/frontend/rust-lib/flowy-document/Cargo.toml @@ -7,16 +7,17 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -flowy-document-infra = { path = "../flowy-document-infra" } +flowy-document-infra = { path = "../../../shared-lib/flowy-document-infra" } +flowy-derive = { path = "../../../shared-lib/flowy-derive" } +lib-ot = { path = "../../../shared-lib/lib-ot" } +lib-ws = { path = "../../../shared-lib/lib-ws" } +backend-service = { path = "../../../shared-lib/backend-service" } + derive_more = {version = "0.99", features = ["display"]} lib-dispatch = { path = "../lib-dispatch" } -flowy-derive = { path = "../flowy-derive" } -flowy-database = { path = "../flowy-database" } lib-infra = { path = "../lib-infra" } +flowy-database = { path = "../flowy-database" } dart-notify = { path = "../dart-notify" } -lib-ot = { path = "../lib-ot" } -lib-ws = { path = "../lib-ws" } -backend-service = { path = "../backend-service" } diesel = {version = "1.4.8", features = ["sqlite"]} diff --git a/frontend/rust-lib/flowy-sdk/Cargo.toml b/frontend/rust-lib/flowy-sdk/Cargo.toml index f0f3d6d556..a3067469de 100644 --- a/frontend/rust-lib/flowy-sdk/Cargo.toml +++ b/frontend/rust-lib/flowy-sdk/Cargo.toml @@ -9,13 +9,10 @@ edition = "2018" lib-dispatch = { path = "../lib-dispatch" } lib-log = { path = "../lib-log" } flowy-user = { path = "../flowy-user" } -lib-infra = { path = "../lib-infra" } flowy-workspace = { path = "../flowy-workspace", default-features = false } flowy-database = { path = "../flowy-database" } flowy-document = { path = "../flowy-document" } -flowy-document-infra = { path = "../flowy-document-infra" } -lib-ws = { path = "../lib-ws" } -backend-service = { path = "../backend-service" } +lib-infra = { path = "../lib-infra" } tracing = { version = "0.1" } log = "0.4.14" futures-core = { version = "0.3", default-features = false } @@ -24,6 +21,12 @@ bytes = "1.0" tokio = { version = "1", features = ["rt"] } parking_lot = "0.11" + +flowy-document-infra = { path = "../../../shared-lib/flowy-document-infra" } +lib-ws = { path = "../../../shared-lib/lib-ws" } +backend-service = { path = "../../../shared-lib/backend-service" } + + [dev-dependencies] serde = { version = "1.0", features = ["derive"] } bincode = { version = "1.3"} diff --git a/frontend/rust-lib/flowy-test/Cargo.toml b/frontend/rust-lib/flowy-test/Cargo.toml index 9662ea22ce..6c3bafa854 100644 --- a/frontend/rust-lib/flowy-test/Cargo.toml +++ b/frontend/rust-lib/flowy-test/Cargo.toml @@ -7,13 +7,15 @@ edition = "2018" [dependencies] flowy-sdk = { path = "../flowy-sdk"} -lib-dispatch = { path = "../lib-dispatch" } flowy-user = { path = "../flowy-user"} flowy-workspace = { path = "../flowy-workspace", default-features = false} -lib-infra = { path = "../lib-infra" } flowy-document = { path = "../flowy-document"} -flowy-document-infra = { path = "../flowy-document-infra"} -backend-service = { path = "../backend-service" } +lib-dispatch = { path = "../lib-dispatch" } +lib-infra = { path = "../lib-infra" } + +flowy-document-infra = { path = "../../../shared-lib/flowy-document-infra" } +backend-service = { path = "../../../shared-lib/backend-service" } + serde = { version = "1.0", features = ["derive"] } bincode = { version = "1.3"} diff --git a/frontend/rust-lib/flowy-user/Cargo.toml b/frontend/rust-lib/flowy-user/Cargo.toml index fdf2f61b01..0bcdb4c5d6 100644 --- a/frontend/rust-lib/flowy-user/Cargo.toml +++ b/frontend/rust-lib/flowy-user/Cargo.toml @@ -6,16 +6,17 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -flowy-user-infra = { path = "../flowy-user-infra" } -backend-service = { path = "../backend-service" } +flowy-user-infra = { path = "../../../shared-lib/flowy-user-infra" } +backend-service = { path = "../../../shared-lib/backend-service" } +flowy-derive = { path = "../../../shared-lib/flowy-derive" } +lib-ws = { path = "../../../shared-lib/lib-ws" } + derive_more = {version = "0.99", features = ["display"]} -lib-dispatch = { path = "../lib-dispatch" } -flowy-derive = { path = "../flowy-derive" } flowy-database = { path = "../flowy-database" } -lib-sqlite = { path = "../lib-sqlite" } -lib-infra = { path = "../lib-infra" } -lib-ws = { path = "../lib-ws" } dart-notify = { path = "../dart-notify" } +lib-dispatch = { path = "../lib-dispatch" } +lib-infra = { path = "../lib-infra" } +lib-sqlite = { path = "../lib-sqlite" } tracing = { version = "0.1", features = ["log"] } bytes = "1.0" diff --git a/frontend/rust-lib/flowy-workspace/Cargo.toml b/frontend/rust-lib/flowy-workspace/Cargo.toml index 65ba22d5a5..233522f4d9 100644 --- a/frontend/rust-lib/flowy-workspace/Cargo.toml +++ b/frontend/rust-lib/flowy-workspace/Cargo.toml @@ -6,17 +6,20 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -flowy-workspace-infra = { path = "../flowy-workspace-infra" } -flowy-document-infra = { path = "../flowy-document-infra" } +flowy-workspace-infra = { path = "../../../shared-lib/flowy-workspace-infra" } +flowy-document-infra = { path = "../../../shared-lib/flowy-document-infra" } +flowy-derive = { path = "../../../shared-lib/flowy-derive" } +lib-ot = { path = "../../../shared-lib/lib-ot" } +backend-service = { path = "../../../shared-lib/backend-service" } + + flowy-document = { path = "../flowy-document" } -lib-dispatch = { path = "../lib-dispatch" } -flowy-derive = { path = "../flowy-derive" } flowy-database = { path = "../flowy-database" } -lib-sqlite = { path = "../lib-sqlite" } -lib-infra = { path = "../lib-infra" } dart-notify = { path = "../dart-notify" } -lib-ot = { path = "../lib-ot" } -backend-service = { path = "../backend-service" } +lib-dispatch = { path = "../lib-dispatch" } +lib-infra = { path = "../lib-infra" } +lib-sqlite = { path = "../lib-sqlite" } + parking_lot = "0.11" protobuf = {version = "2.18.0"} diff --git a/frontend/rust-lib/lib-infra/Cargo.toml b/frontend/rust-lib/lib-infra/Cargo.toml index 0113d25fa4..355f38d8cd 100644 --- a/frontend/rust-lib/lib-infra/Cargo.toml +++ b/frontend/rust-lib/lib-infra/Cargo.toml @@ -10,7 +10,7 @@ uuid = { version = "0.8", features = ["serde", "v4"] } diesel = {version = "1.4.8", features = ["sqlite"]} diesel_derives = {version = "1.4.1", features = ["sqlite"]} diesel_migrations = {version = "1.4.0", features = ["sqlite"]} -flowy-derive = { path = "../flowy-derive"} +flowy-derive = { path = "../../../shared-lib/flowy-derive" } lib-sqlite = { path = "../lib-sqlite" } lazy_static = "1.4.0" protobuf = {version = "2.18.0"} diff --git a/frontend/scripts/flowy-tool/Cargo.toml b/frontend/scripts/flowy-tool/Cargo.toml index 76d51d6146..12d10fbe50 100644 --- a/frontend/scripts/flowy-tool/Cargo.toml +++ b/frontend/scripts/flowy-tool/Cargo.toml @@ -14,7 +14,7 @@ log = "0.4.11" env_logger = "0.8.2" #shell = { git="https://github.com/google/rust-shell.git"} cmd_lib = "1.1" -flowy-ast = { path = "../../rust-lib/flowy-ast" } +flowy-ast = { path = "../../shared-lib/flowy-ast" } console = "0.14.0" fancy-regex = "0.5.0" lazy_static = "1.4.0" diff --git a/shared-lib/Cargo.toml b/shared-lib/Cargo.toml new file mode 100644 index 0000000000..ab26a64afb --- /dev/null +++ b/shared-lib/Cargo.toml @@ -0,0 +1,14 @@ +[workspace] +members = [ + "flowy-user-infra", + "flowy-workspace-infra", + "flowy-document-infra", + "lib-ot", + "lib-ws", + "backend-service", + "flowy-derive", + "flowy-ast", +] + +[profile.dev] +split-debuginfo = "unpacked" diff --git a/frontend/rust-lib/backend-service/Cargo.toml b/shared-lib/backend-service/Cargo.toml similarity index 100% rename from frontend/rust-lib/backend-service/Cargo.toml rename to shared-lib/backend-service/Cargo.toml diff --git a/frontend/rust-lib/backend-service/src/config.rs b/shared-lib/backend-service/src/config.rs similarity index 100% rename from frontend/rust-lib/backend-service/src/config.rs rename to shared-lib/backend-service/src/config.rs diff --git a/frontend/rust-lib/backend-service/src/errors.rs b/shared-lib/backend-service/src/errors.rs similarity index 100% rename from frontend/rust-lib/backend-service/src/errors.rs rename to shared-lib/backend-service/src/errors.rs diff --git a/frontend/rust-lib/backend-service/src/lib.rs b/shared-lib/backend-service/src/lib.rs similarity index 100% rename from frontend/rust-lib/backend-service/src/lib.rs rename to shared-lib/backend-service/src/lib.rs diff --git a/frontend/rust-lib/backend-service/src/middleware.rs b/shared-lib/backend-service/src/middleware.rs similarity index 100% rename from frontend/rust-lib/backend-service/src/middleware.rs rename to shared-lib/backend-service/src/middleware.rs diff --git a/frontend/rust-lib/backend-service/src/request/mod.rs b/shared-lib/backend-service/src/request/mod.rs similarity index 100% rename from frontend/rust-lib/backend-service/src/request/mod.rs rename to shared-lib/backend-service/src/request/mod.rs diff --git a/frontend/rust-lib/backend-service/src/request/request.rs b/shared-lib/backend-service/src/request/request.rs similarity index 100% rename from frontend/rust-lib/backend-service/src/request/request.rs rename to shared-lib/backend-service/src/request/request.rs diff --git a/frontend/rust-lib/backend-service/src/response/mod.rs b/shared-lib/backend-service/src/response/mod.rs similarity index 100% rename from frontend/rust-lib/backend-service/src/response/mod.rs rename to shared-lib/backend-service/src/response/mod.rs diff --git a/frontend/rust-lib/backend-service/src/response/response.rs b/shared-lib/backend-service/src/response/response.rs similarity index 100% rename from frontend/rust-lib/backend-service/src/response/response.rs rename to shared-lib/backend-service/src/response/response.rs diff --git a/frontend/rust-lib/backend-service/src/response/response_http.rs b/shared-lib/backend-service/src/response/response_http.rs similarity index 100% rename from frontend/rust-lib/backend-service/src/response/response_http.rs rename to shared-lib/backend-service/src/response/response_http.rs diff --git a/frontend/rust-lib/backend-service/src/user_request.rs b/shared-lib/backend-service/src/user_request.rs similarity index 100% rename from frontend/rust-lib/backend-service/src/user_request.rs rename to shared-lib/backend-service/src/user_request.rs diff --git a/frontend/rust-lib/backend-service/src/workspace_request.rs b/shared-lib/backend-service/src/workspace_request.rs similarity index 100% rename from frontend/rust-lib/backend-service/src/workspace_request.rs rename to shared-lib/backend-service/src/workspace_request.rs diff --git a/frontend/rust-lib/flowy-ast/Cargo.toml b/shared-lib/flowy-ast/Cargo.toml similarity index 100% rename from frontend/rust-lib/flowy-ast/Cargo.toml rename to shared-lib/flowy-ast/Cargo.toml diff --git a/frontend/rust-lib/flowy-ast/src/ast.rs b/shared-lib/flowy-ast/src/ast.rs similarity index 100% rename from frontend/rust-lib/flowy-ast/src/ast.rs rename to shared-lib/flowy-ast/src/ast.rs diff --git a/frontend/rust-lib/flowy-ast/src/attr.rs b/shared-lib/flowy-ast/src/attr.rs similarity index 100% rename from frontend/rust-lib/flowy-ast/src/attr.rs rename to shared-lib/flowy-ast/src/attr.rs diff --git a/frontend/rust-lib/flowy-ast/src/ctxt.rs b/shared-lib/flowy-ast/src/ctxt.rs similarity index 100% rename from frontend/rust-lib/flowy-ast/src/ctxt.rs rename to shared-lib/flowy-ast/src/ctxt.rs diff --git a/frontend/rust-lib/flowy-ast/src/event_ast.rs b/shared-lib/flowy-ast/src/event_ast.rs similarity index 100% rename from frontend/rust-lib/flowy-ast/src/event_ast.rs rename to shared-lib/flowy-ast/src/event_ast.rs diff --git a/frontend/rust-lib/flowy-ast/src/lib.rs b/shared-lib/flowy-ast/src/lib.rs similarity index 100% rename from frontend/rust-lib/flowy-ast/src/lib.rs rename to shared-lib/flowy-ast/src/lib.rs diff --git a/frontend/rust-lib/flowy-ast/src/symbol.rs b/shared-lib/flowy-ast/src/symbol.rs similarity index 100% rename from frontend/rust-lib/flowy-ast/src/symbol.rs rename to shared-lib/flowy-ast/src/symbol.rs diff --git a/frontend/rust-lib/flowy-ast/src/ty_ext.rs b/shared-lib/flowy-ast/src/ty_ext.rs similarity index 100% rename from frontend/rust-lib/flowy-ast/src/ty_ext.rs rename to shared-lib/flowy-ast/src/ty_ext.rs diff --git a/frontend/rust-lib/flowy-derive/.gitignore b/shared-lib/flowy-derive/.gitignore similarity index 100% rename from frontend/rust-lib/flowy-derive/.gitignore rename to shared-lib/flowy-derive/.gitignore diff --git a/frontend/rust-lib/flowy-derive/Cargo.toml b/shared-lib/flowy-derive/Cargo.toml similarity index 100% rename from frontend/rust-lib/flowy-derive/Cargo.toml rename to shared-lib/flowy-derive/Cargo.toml diff --git a/frontend/rust-lib/flowy-derive/src/dart_event/mod.rs b/shared-lib/flowy-derive/src/dart_event/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-derive/src/dart_event/mod.rs rename to shared-lib/flowy-derive/src/dart_event/mod.rs diff --git a/frontend/rust-lib/flowy-derive/src/derive_cache/derive_cache.rs b/shared-lib/flowy-derive/src/derive_cache/derive_cache.rs similarity index 100% rename from frontend/rust-lib/flowy-derive/src/derive_cache/derive_cache.rs rename to shared-lib/flowy-derive/src/derive_cache/derive_cache.rs diff --git a/frontend/rust-lib/flowy-derive/src/derive_cache/mod.rs b/shared-lib/flowy-derive/src/derive_cache/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-derive/src/derive_cache/mod.rs rename to shared-lib/flowy-derive/src/derive_cache/mod.rs diff --git a/frontend/rust-lib/flowy-derive/src/lib.rs b/shared-lib/flowy-derive/src/lib.rs similarity index 100% rename from frontend/rust-lib/flowy-derive/src/lib.rs rename to shared-lib/flowy-derive/src/lib.rs diff --git a/frontend/rust-lib/flowy-derive/src/proto_buf/deserialize.rs b/shared-lib/flowy-derive/src/proto_buf/deserialize.rs similarity index 100% rename from frontend/rust-lib/flowy-derive/src/proto_buf/deserialize.rs rename to shared-lib/flowy-derive/src/proto_buf/deserialize.rs diff --git a/frontend/rust-lib/flowy-derive/src/proto_buf/enum_serde.rs b/shared-lib/flowy-derive/src/proto_buf/enum_serde.rs similarity index 100% rename from frontend/rust-lib/flowy-derive/src/proto_buf/enum_serde.rs rename to shared-lib/flowy-derive/src/proto_buf/enum_serde.rs diff --git a/frontend/rust-lib/flowy-derive/src/proto_buf/mod.rs b/shared-lib/flowy-derive/src/proto_buf/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-derive/src/proto_buf/mod.rs rename to shared-lib/flowy-derive/src/proto_buf/mod.rs diff --git a/frontend/rust-lib/flowy-derive/src/proto_buf/serialize.rs b/shared-lib/flowy-derive/src/proto_buf/serialize.rs similarity index 100% rename from frontend/rust-lib/flowy-derive/src/proto_buf/serialize.rs rename to shared-lib/flowy-derive/src/proto_buf/serialize.rs diff --git a/frontend/rust-lib/flowy-derive/src/proto_buf/util.rs b/shared-lib/flowy-derive/src/proto_buf/util.rs similarity index 100% rename from frontend/rust-lib/flowy-derive/src/proto_buf/util.rs rename to shared-lib/flowy-derive/src/proto_buf/util.rs diff --git a/frontend/rust-lib/flowy-derive/tests/progress.rs b/shared-lib/flowy-derive/tests/progress.rs similarity index 100% rename from frontend/rust-lib/flowy-derive/tests/progress.rs rename to shared-lib/flowy-derive/tests/progress.rs diff --git a/frontend/rust-lib/flowy-document-infra/Cargo.toml b/shared-lib/flowy-document-infra/Cargo.toml similarity index 100% rename from frontend/rust-lib/flowy-document-infra/Cargo.toml rename to shared-lib/flowy-document-infra/Cargo.toml diff --git a/frontend/rust-lib/flowy-document-infra/Flowy.toml b/shared-lib/flowy-document-infra/Flowy.toml similarity index 100% rename from frontend/rust-lib/flowy-document-infra/Flowy.toml rename to shared-lib/flowy-document-infra/Flowy.toml diff --git a/frontend/rust-lib/flowy-document-infra/src/READ_ME.json b/shared-lib/flowy-document-infra/src/READ_ME.json similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/READ_ME.json rename to shared-lib/flowy-document-infra/src/READ_ME.json diff --git a/frontend/rust-lib/flowy-document-infra/src/core/data.rs b/shared-lib/flowy-document-infra/src/core/data.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/data.rs rename to shared-lib/flowy-document-infra/src/core/data.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/document.rs b/shared-lib/flowy-document-infra/src/core/document.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/document.rs rename to shared-lib/flowy-document-infra/src/core/document.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/extensions/delete/default_delete.rs b/shared-lib/flowy-document-infra/src/core/extensions/delete/default_delete.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/extensions/delete/default_delete.rs rename to shared-lib/flowy-document-infra/src/core/extensions/delete/default_delete.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/extensions/delete/mod.rs b/shared-lib/flowy-document-infra/src/core/extensions/delete/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/extensions/delete/mod.rs rename to shared-lib/flowy-document-infra/src/core/extensions/delete/mod.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/extensions/delete/preserve_line_format_merge.rs b/shared-lib/flowy-document-infra/src/core/extensions/delete/preserve_line_format_merge.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/extensions/delete/preserve_line_format_merge.rs rename to shared-lib/flowy-document-infra/src/core/extensions/delete/preserve_line_format_merge.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/extensions/format/format_at_position.rs b/shared-lib/flowy-document-infra/src/core/extensions/format/format_at_position.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/extensions/format/format_at_position.rs rename to shared-lib/flowy-document-infra/src/core/extensions/format/format_at_position.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/extensions/format/helper.rs b/shared-lib/flowy-document-infra/src/core/extensions/format/helper.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/extensions/format/helper.rs rename to shared-lib/flowy-document-infra/src/core/extensions/format/helper.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/extensions/format/mod.rs b/shared-lib/flowy-document-infra/src/core/extensions/format/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/extensions/format/mod.rs rename to shared-lib/flowy-document-infra/src/core/extensions/format/mod.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/extensions/format/resolve_block_format.rs b/shared-lib/flowy-document-infra/src/core/extensions/format/resolve_block_format.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/extensions/format/resolve_block_format.rs rename to shared-lib/flowy-document-infra/src/core/extensions/format/resolve_block_format.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/extensions/format/resolve_inline_format.rs b/shared-lib/flowy-document-infra/src/core/extensions/format/resolve_inline_format.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/extensions/format/resolve_inline_format.rs rename to shared-lib/flowy-document-infra/src/core/extensions/format/resolve_inline_format.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/extensions/insert/auto_exit_block.rs b/shared-lib/flowy-document-infra/src/core/extensions/insert/auto_exit_block.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/extensions/insert/auto_exit_block.rs rename to shared-lib/flowy-document-infra/src/core/extensions/insert/auto_exit_block.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/extensions/insert/auto_format.rs b/shared-lib/flowy-document-infra/src/core/extensions/insert/auto_format.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/extensions/insert/auto_format.rs rename to shared-lib/flowy-document-infra/src/core/extensions/insert/auto_format.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/extensions/insert/default_insert.rs b/shared-lib/flowy-document-infra/src/core/extensions/insert/default_insert.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/extensions/insert/default_insert.rs rename to shared-lib/flowy-document-infra/src/core/extensions/insert/default_insert.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/extensions/insert/mod.rs b/shared-lib/flowy-document-infra/src/core/extensions/insert/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/extensions/insert/mod.rs rename to shared-lib/flowy-document-infra/src/core/extensions/insert/mod.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/extensions/insert/preserve_block_format.rs b/shared-lib/flowy-document-infra/src/core/extensions/insert/preserve_block_format.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/extensions/insert/preserve_block_format.rs rename to shared-lib/flowy-document-infra/src/core/extensions/insert/preserve_block_format.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/extensions/insert/preserve_inline_format.rs b/shared-lib/flowy-document-infra/src/core/extensions/insert/preserve_inline_format.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/extensions/insert/preserve_inline_format.rs rename to shared-lib/flowy-document-infra/src/core/extensions/insert/preserve_inline_format.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/extensions/insert/reset_format_on_new_line.rs b/shared-lib/flowy-document-infra/src/core/extensions/insert/reset_format_on_new_line.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/extensions/insert/reset_format_on_new_line.rs rename to shared-lib/flowy-document-infra/src/core/extensions/insert/reset_format_on_new_line.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/extensions/mod.rs b/shared-lib/flowy-document-infra/src/core/extensions/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/extensions/mod.rs rename to shared-lib/flowy-document-infra/src/core/extensions/mod.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/history.rs b/shared-lib/flowy-document-infra/src/core/history.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/history.rs rename to shared-lib/flowy-document-infra/src/core/history.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/mod.rs b/shared-lib/flowy-document-infra/src/core/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/mod.rs rename to shared-lib/flowy-document-infra/src/core/mod.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/core/view.rs b/shared-lib/flowy-document-infra/src/core/view.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/core/view.rs rename to shared-lib/flowy-document-infra/src/core/view.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/entities/doc/doc.rs b/shared-lib/flowy-document-infra/src/entities/doc/doc.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/entities/doc/doc.rs rename to shared-lib/flowy-document-infra/src/entities/doc/doc.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/entities/doc/mod.rs b/shared-lib/flowy-document-infra/src/entities/doc/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/entities/doc/mod.rs rename to shared-lib/flowy-document-infra/src/entities/doc/mod.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/entities/doc/parser/doc_id.rs b/shared-lib/flowy-document-infra/src/entities/doc/parser/doc_id.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/entities/doc/parser/doc_id.rs rename to shared-lib/flowy-document-infra/src/entities/doc/parser/doc_id.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/entities/doc/parser/mod.rs b/shared-lib/flowy-document-infra/src/entities/doc/parser/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/entities/doc/parser/mod.rs rename to shared-lib/flowy-document-infra/src/entities/doc/parser/mod.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/entities/doc/revision.rs b/shared-lib/flowy-document-infra/src/entities/doc/revision.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/entities/doc/revision.rs rename to shared-lib/flowy-document-infra/src/entities/doc/revision.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/entities/mod.rs b/shared-lib/flowy-document-infra/src/entities/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/entities/mod.rs rename to shared-lib/flowy-document-infra/src/entities/mod.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/entities/ws/mod.rs b/shared-lib/flowy-document-infra/src/entities/ws/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/entities/ws/mod.rs rename to shared-lib/flowy-document-infra/src/entities/ws/mod.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/entities/ws/ws.rs b/shared-lib/flowy-document-infra/src/entities/ws/ws.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/entities/ws/ws.rs rename to shared-lib/flowy-document-infra/src/entities/ws/ws.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/errors.rs b/shared-lib/flowy-document-infra/src/errors.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/errors.rs rename to shared-lib/flowy-document-infra/src/errors.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/lib.rs b/shared-lib/flowy-document-infra/src/lib.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/lib.rs rename to shared-lib/flowy-document-infra/src/lib.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/protobuf/mod.rs b/shared-lib/flowy-document-infra/src/protobuf/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/protobuf/mod.rs rename to shared-lib/flowy-document-infra/src/protobuf/mod.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/protobuf/model/doc.rs b/shared-lib/flowy-document-infra/src/protobuf/model/doc.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/protobuf/model/doc.rs rename to shared-lib/flowy-document-infra/src/protobuf/model/doc.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/protobuf/model/mod.rs b/shared-lib/flowy-document-infra/src/protobuf/model/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/protobuf/model/mod.rs rename to shared-lib/flowy-document-infra/src/protobuf/model/mod.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/protobuf/model/revision.rs b/shared-lib/flowy-document-infra/src/protobuf/model/revision.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/protobuf/model/revision.rs rename to shared-lib/flowy-document-infra/src/protobuf/model/revision.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/protobuf/model/ws.rs b/shared-lib/flowy-document-infra/src/protobuf/model/ws.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/protobuf/model/ws.rs rename to shared-lib/flowy-document-infra/src/protobuf/model/ws.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/protobuf/proto/doc.proto b/shared-lib/flowy-document-infra/src/protobuf/proto/doc.proto similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/protobuf/proto/doc.proto rename to shared-lib/flowy-document-infra/src/protobuf/proto/doc.proto diff --git a/frontend/rust-lib/flowy-document-infra/src/protobuf/proto/revision.proto b/shared-lib/flowy-document-infra/src/protobuf/proto/revision.proto similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/protobuf/proto/revision.proto rename to shared-lib/flowy-document-infra/src/protobuf/proto/revision.proto diff --git a/frontend/rust-lib/flowy-document-infra/src/protobuf/proto/ws.proto b/shared-lib/flowy-document-infra/src/protobuf/proto/ws.proto similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/protobuf/proto/ws.proto rename to shared-lib/flowy-document-infra/src/protobuf/proto/ws.proto diff --git a/frontend/rust-lib/flowy-document-infra/src/user_default.rs b/shared-lib/flowy-document-infra/src/user_default.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/user_default.rs rename to shared-lib/flowy-document-infra/src/user_default.rs diff --git a/frontend/rust-lib/flowy-document-infra/src/util.rs b/shared-lib/flowy-document-infra/src/util.rs similarity index 100% rename from frontend/rust-lib/flowy-document-infra/src/util.rs rename to shared-lib/flowy-document-infra/src/util.rs diff --git a/frontend/rust-lib/flowy-user-infra/Cargo.toml b/shared-lib/flowy-user-infra/Cargo.toml similarity index 100% rename from frontend/rust-lib/flowy-user-infra/Cargo.toml rename to shared-lib/flowy-user-infra/Cargo.toml diff --git a/frontend/rust-lib/flowy-user-infra/Flowy.toml b/shared-lib/flowy-user-infra/Flowy.toml similarity index 100% rename from frontend/rust-lib/flowy-user-infra/Flowy.toml rename to shared-lib/flowy-user-infra/Flowy.toml diff --git a/frontend/rust-lib/flowy-user-infra/src/entities/auth.rs b/shared-lib/flowy-user-infra/src/entities/auth.rs similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/entities/auth.rs rename to shared-lib/flowy-user-infra/src/entities/auth.rs diff --git a/frontend/rust-lib/flowy-user-infra/src/entities/mod.rs b/shared-lib/flowy-user-infra/src/entities/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/entities/mod.rs rename to shared-lib/flowy-user-infra/src/entities/mod.rs diff --git a/frontend/rust-lib/flowy-user-infra/src/entities/user_profile.rs b/shared-lib/flowy-user-infra/src/entities/user_profile.rs similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/entities/user_profile.rs rename to shared-lib/flowy-user-infra/src/entities/user_profile.rs diff --git a/frontend/rust-lib/flowy-user-infra/src/errors.rs b/shared-lib/flowy-user-infra/src/errors.rs similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/errors.rs rename to shared-lib/flowy-user-infra/src/errors.rs diff --git a/frontend/rust-lib/flowy-user-infra/src/lib.rs b/shared-lib/flowy-user-infra/src/lib.rs similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/lib.rs rename to shared-lib/flowy-user-infra/src/lib.rs diff --git a/frontend/rust-lib/flowy-user-infra/src/parser/mod.rs b/shared-lib/flowy-user-infra/src/parser/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/parser/mod.rs rename to shared-lib/flowy-user-infra/src/parser/mod.rs diff --git a/frontend/rust-lib/flowy-user-infra/src/parser/user_email.rs b/shared-lib/flowy-user-infra/src/parser/user_email.rs similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/parser/user_email.rs rename to shared-lib/flowy-user-infra/src/parser/user_email.rs diff --git a/frontend/rust-lib/flowy-user-infra/src/parser/user_id.rs b/shared-lib/flowy-user-infra/src/parser/user_id.rs similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/parser/user_id.rs rename to shared-lib/flowy-user-infra/src/parser/user_id.rs diff --git a/frontend/rust-lib/flowy-user-infra/src/parser/user_name.rs b/shared-lib/flowy-user-infra/src/parser/user_name.rs similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/parser/user_name.rs rename to shared-lib/flowy-user-infra/src/parser/user_name.rs diff --git a/frontend/rust-lib/flowy-user-infra/src/parser/user_password.rs b/shared-lib/flowy-user-infra/src/parser/user_password.rs similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/parser/user_password.rs rename to shared-lib/flowy-user-infra/src/parser/user_password.rs diff --git a/frontend/rust-lib/flowy-user-infra/src/parser/user_workspace.rs b/shared-lib/flowy-user-infra/src/parser/user_workspace.rs similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/parser/user_workspace.rs rename to shared-lib/flowy-user-infra/src/parser/user_workspace.rs diff --git a/frontend/rust-lib/flowy-user-infra/src/protobuf/mod.rs b/shared-lib/flowy-user-infra/src/protobuf/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/protobuf/mod.rs rename to shared-lib/flowy-user-infra/src/protobuf/mod.rs diff --git a/frontend/rust-lib/flowy-user-infra/src/protobuf/model/auth.rs b/shared-lib/flowy-user-infra/src/protobuf/model/auth.rs similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/protobuf/model/auth.rs rename to shared-lib/flowy-user-infra/src/protobuf/model/auth.rs diff --git a/frontend/rust-lib/flowy-user-infra/src/protobuf/model/errors.rs b/shared-lib/flowy-user-infra/src/protobuf/model/errors.rs similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/protobuf/model/errors.rs rename to shared-lib/flowy-user-infra/src/protobuf/model/errors.rs diff --git a/frontend/rust-lib/flowy-user-infra/src/protobuf/model/mod.rs b/shared-lib/flowy-user-infra/src/protobuf/model/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/protobuf/model/mod.rs rename to shared-lib/flowy-user-infra/src/protobuf/model/mod.rs diff --git a/frontend/rust-lib/flowy-user-infra/src/protobuf/model/user_profile.rs b/shared-lib/flowy-user-infra/src/protobuf/model/user_profile.rs similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/protobuf/model/user_profile.rs rename to shared-lib/flowy-user-infra/src/protobuf/model/user_profile.rs diff --git a/frontend/rust-lib/flowy-user-infra/src/protobuf/proto/auth.proto b/shared-lib/flowy-user-infra/src/protobuf/proto/auth.proto similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/protobuf/proto/auth.proto rename to shared-lib/flowy-user-infra/src/protobuf/proto/auth.proto diff --git a/frontend/rust-lib/flowy-user-infra/src/protobuf/proto/errors.proto b/shared-lib/flowy-user-infra/src/protobuf/proto/errors.proto similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/protobuf/proto/errors.proto rename to shared-lib/flowy-user-infra/src/protobuf/proto/errors.proto diff --git a/frontend/rust-lib/flowy-user-infra/src/protobuf/proto/user_profile.proto b/shared-lib/flowy-user-infra/src/protobuf/proto/user_profile.proto similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/protobuf/proto/user_profile.proto rename to shared-lib/flowy-user-infra/src/protobuf/proto/user_profile.proto diff --git a/frontend/rust-lib/flowy-user-infra/src/user_default.rs b/shared-lib/flowy-user-infra/src/user_default.rs similarity index 100% rename from frontend/rust-lib/flowy-user-infra/src/user_default.rs rename to shared-lib/flowy-user-infra/src/user_default.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/Cargo.toml b/shared-lib/flowy-workspace-infra/Cargo.toml similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/Cargo.toml rename to shared-lib/flowy-workspace-infra/Cargo.toml diff --git a/frontend/rust-lib/flowy-workspace-infra/Flowy.toml b/shared-lib/flowy-workspace-infra/Flowy.toml similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/Flowy.toml rename to shared-lib/flowy-workspace-infra/Flowy.toml diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/app/app_create.rs b/shared-lib/flowy-workspace-infra/src/entities/app/app_create.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/app/app_create.rs rename to shared-lib/flowy-workspace-infra/src/entities/app/app_create.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/app/app_query.rs b/shared-lib/flowy-workspace-infra/src/entities/app/app_query.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/app/app_query.rs rename to shared-lib/flowy-workspace-infra/src/entities/app/app_query.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/app/app_update.rs b/shared-lib/flowy-workspace-infra/src/entities/app/app_update.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/app/app_update.rs rename to shared-lib/flowy-workspace-infra/src/entities/app/app_update.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/app/mod.rs b/shared-lib/flowy-workspace-infra/src/entities/app/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/app/mod.rs rename to shared-lib/flowy-workspace-infra/src/entities/app/mod.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/mod.rs b/shared-lib/flowy-workspace-infra/src/entities/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/mod.rs rename to shared-lib/flowy-workspace-infra/src/entities/mod.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/share/export.rs b/shared-lib/flowy-workspace-infra/src/entities/share/export.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/share/export.rs rename to shared-lib/flowy-workspace-infra/src/entities/share/export.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/share/mod.rs b/shared-lib/flowy-workspace-infra/src/entities/share/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/share/mod.rs rename to shared-lib/flowy-workspace-infra/src/entities/share/mod.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/trash/mod.rs b/shared-lib/flowy-workspace-infra/src/entities/trash/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/trash/mod.rs rename to shared-lib/flowy-workspace-infra/src/entities/trash/mod.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/trash/trash_create.rs b/shared-lib/flowy-workspace-infra/src/entities/trash/trash_create.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/trash/trash_create.rs rename to shared-lib/flowy-workspace-infra/src/entities/trash/trash_create.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/view/mod.rs b/shared-lib/flowy-workspace-infra/src/entities/view/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/view/mod.rs rename to shared-lib/flowy-workspace-infra/src/entities/view/mod.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/view/view_create.rs b/shared-lib/flowy-workspace-infra/src/entities/view/view_create.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/view/view_create.rs rename to shared-lib/flowy-workspace-infra/src/entities/view/view_create.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/view/view_query.rs b/shared-lib/flowy-workspace-infra/src/entities/view/view_query.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/view/view_query.rs rename to shared-lib/flowy-workspace-infra/src/entities/view/view_query.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/view/view_update.rs b/shared-lib/flowy-workspace-infra/src/entities/view/view_update.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/view/view_update.rs rename to shared-lib/flowy-workspace-infra/src/entities/view/view_update.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/workspace/mod.rs b/shared-lib/flowy-workspace-infra/src/entities/workspace/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/workspace/mod.rs rename to shared-lib/flowy-workspace-infra/src/entities/workspace/mod.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/workspace/workspace_create.rs b/shared-lib/flowy-workspace-infra/src/entities/workspace/workspace_create.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/workspace/workspace_create.rs rename to shared-lib/flowy-workspace-infra/src/entities/workspace/workspace_create.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/workspace/workspace_query.rs b/shared-lib/flowy-workspace-infra/src/entities/workspace/workspace_query.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/workspace/workspace_query.rs rename to shared-lib/flowy-workspace-infra/src/entities/workspace/workspace_query.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/workspace/workspace_setting.rs b/shared-lib/flowy-workspace-infra/src/entities/workspace/workspace_setting.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/workspace/workspace_setting.rs rename to shared-lib/flowy-workspace-infra/src/entities/workspace/workspace_setting.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/entities/workspace/workspace_update.rs b/shared-lib/flowy-workspace-infra/src/entities/workspace/workspace_update.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/entities/workspace/workspace_update.rs rename to shared-lib/flowy-workspace-infra/src/entities/workspace/workspace_update.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/errors.rs b/shared-lib/flowy-workspace-infra/src/errors.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/errors.rs rename to shared-lib/flowy-workspace-infra/src/errors.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/lib.rs b/shared-lib/flowy-workspace-infra/src/lib.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/lib.rs rename to shared-lib/flowy-workspace-infra/src/lib.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/macros.rs b/shared-lib/flowy-workspace-infra/src/macros.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/macros.rs rename to shared-lib/flowy-workspace-infra/src/macros.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/app/app_color_style.rs b/shared-lib/flowy-workspace-infra/src/parser/app/app_color_style.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/app/app_color_style.rs rename to shared-lib/flowy-workspace-infra/src/parser/app/app_color_style.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/app/app_desc.rs b/shared-lib/flowy-workspace-infra/src/parser/app/app_desc.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/app/app_desc.rs rename to shared-lib/flowy-workspace-infra/src/parser/app/app_desc.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/app/app_id.rs b/shared-lib/flowy-workspace-infra/src/parser/app/app_id.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/app/app_id.rs rename to shared-lib/flowy-workspace-infra/src/parser/app/app_id.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/app/app_name.rs b/shared-lib/flowy-workspace-infra/src/parser/app/app_name.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/app/app_name.rs rename to shared-lib/flowy-workspace-infra/src/parser/app/app_name.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/app/mod.rs b/shared-lib/flowy-workspace-infra/src/parser/app/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/app/mod.rs rename to shared-lib/flowy-workspace-infra/src/parser/app/mod.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/mod.rs b/shared-lib/flowy-workspace-infra/src/parser/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/mod.rs rename to shared-lib/flowy-workspace-infra/src/parser/mod.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/trash/mod.rs b/shared-lib/flowy-workspace-infra/src/parser/trash/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/trash/mod.rs rename to shared-lib/flowy-workspace-infra/src/parser/trash/mod.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/trash/trash_id.rs b/shared-lib/flowy-workspace-infra/src/parser/trash/trash_id.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/trash/trash_id.rs rename to shared-lib/flowy-workspace-infra/src/parser/trash/trash_id.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/view/delta_data.rs b/shared-lib/flowy-workspace-infra/src/parser/view/delta_data.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/view/delta_data.rs rename to shared-lib/flowy-workspace-infra/src/parser/view/delta_data.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/view/mod.rs b/shared-lib/flowy-workspace-infra/src/parser/view/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/view/mod.rs rename to shared-lib/flowy-workspace-infra/src/parser/view/mod.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/view/view_desc.rs b/shared-lib/flowy-workspace-infra/src/parser/view/view_desc.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/view/view_desc.rs rename to shared-lib/flowy-workspace-infra/src/parser/view/view_desc.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/view/view_id.rs b/shared-lib/flowy-workspace-infra/src/parser/view/view_id.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/view/view_id.rs rename to shared-lib/flowy-workspace-infra/src/parser/view/view_id.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/view/view_name.rs b/shared-lib/flowy-workspace-infra/src/parser/view/view_name.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/view/view_name.rs rename to shared-lib/flowy-workspace-infra/src/parser/view/view_name.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/view/view_thumbnail.rs b/shared-lib/flowy-workspace-infra/src/parser/view/view_thumbnail.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/view/view_thumbnail.rs rename to shared-lib/flowy-workspace-infra/src/parser/view/view_thumbnail.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/workspace/mod.rs b/shared-lib/flowy-workspace-infra/src/parser/workspace/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/workspace/mod.rs rename to shared-lib/flowy-workspace-infra/src/parser/workspace/mod.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/workspace/workspace_desc.rs b/shared-lib/flowy-workspace-infra/src/parser/workspace/workspace_desc.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/workspace/workspace_desc.rs rename to shared-lib/flowy-workspace-infra/src/parser/workspace/workspace_desc.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/workspace/workspace_id.rs b/shared-lib/flowy-workspace-infra/src/parser/workspace/workspace_id.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/workspace/workspace_id.rs rename to shared-lib/flowy-workspace-infra/src/parser/workspace/workspace_id.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/parser/workspace/workspace_name.rs b/shared-lib/flowy-workspace-infra/src/parser/workspace/workspace_name.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/parser/workspace/workspace_name.rs rename to shared-lib/flowy-workspace-infra/src/parser/workspace/workspace_name.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/mod.rs b/shared-lib/flowy-workspace-infra/src/protobuf/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/mod.rs rename to shared-lib/flowy-workspace-infra/src/protobuf/mod.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/app_create.rs b/shared-lib/flowy-workspace-infra/src/protobuf/model/app_create.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/app_create.rs rename to shared-lib/flowy-workspace-infra/src/protobuf/model/app_create.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/app_query.rs b/shared-lib/flowy-workspace-infra/src/protobuf/model/app_query.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/app_query.rs rename to shared-lib/flowy-workspace-infra/src/protobuf/model/app_query.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/app_update.rs b/shared-lib/flowy-workspace-infra/src/protobuf/model/app_update.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/app_update.rs rename to shared-lib/flowy-workspace-infra/src/protobuf/model/app_update.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/errors.rs b/shared-lib/flowy-workspace-infra/src/protobuf/model/errors.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/errors.rs rename to shared-lib/flowy-workspace-infra/src/protobuf/model/errors.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/export.rs b/shared-lib/flowy-workspace-infra/src/protobuf/model/export.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/export.rs rename to shared-lib/flowy-workspace-infra/src/protobuf/model/export.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/mod.rs b/shared-lib/flowy-workspace-infra/src/protobuf/model/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/mod.rs rename to shared-lib/flowy-workspace-infra/src/protobuf/model/mod.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/trash_create.rs b/shared-lib/flowy-workspace-infra/src/protobuf/model/trash_create.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/trash_create.rs rename to shared-lib/flowy-workspace-infra/src/protobuf/model/trash_create.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/view_create.rs b/shared-lib/flowy-workspace-infra/src/protobuf/model/view_create.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/view_create.rs rename to shared-lib/flowy-workspace-infra/src/protobuf/model/view_create.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/view_query.rs b/shared-lib/flowy-workspace-infra/src/protobuf/model/view_query.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/view_query.rs rename to shared-lib/flowy-workspace-infra/src/protobuf/model/view_query.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/view_update.rs b/shared-lib/flowy-workspace-infra/src/protobuf/model/view_update.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/view_update.rs rename to shared-lib/flowy-workspace-infra/src/protobuf/model/view_update.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/workspace_create.rs b/shared-lib/flowy-workspace-infra/src/protobuf/model/workspace_create.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/workspace_create.rs rename to shared-lib/flowy-workspace-infra/src/protobuf/model/workspace_create.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/workspace_query.rs b/shared-lib/flowy-workspace-infra/src/protobuf/model/workspace_query.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/workspace_query.rs rename to shared-lib/flowy-workspace-infra/src/protobuf/model/workspace_query.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/workspace_setting.rs b/shared-lib/flowy-workspace-infra/src/protobuf/model/workspace_setting.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/workspace_setting.rs rename to shared-lib/flowy-workspace-infra/src/protobuf/model/workspace_setting.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/workspace_update.rs b/shared-lib/flowy-workspace-infra/src/protobuf/model/workspace_update.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/model/workspace_update.rs rename to shared-lib/flowy-workspace-infra/src/protobuf/model/workspace_update.rs diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/app_create.proto b/shared-lib/flowy-workspace-infra/src/protobuf/proto/app_create.proto similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/app_create.proto rename to shared-lib/flowy-workspace-infra/src/protobuf/proto/app_create.proto diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/app_query.proto b/shared-lib/flowy-workspace-infra/src/protobuf/proto/app_query.proto similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/app_query.proto rename to shared-lib/flowy-workspace-infra/src/protobuf/proto/app_query.proto diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/app_update.proto b/shared-lib/flowy-workspace-infra/src/protobuf/proto/app_update.proto similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/app_update.proto rename to shared-lib/flowy-workspace-infra/src/protobuf/proto/app_update.proto diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/errors.proto b/shared-lib/flowy-workspace-infra/src/protobuf/proto/errors.proto similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/errors.proto rename to shared-lib/flowy-workspace-infra/src/protobuf/proto/errors.proto diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/export.proto b/shared-lib/flowy-workspace-infra/src/protobuf/proto/export.proto similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/export.proto rename to shared-lib/flowy-workspace-infra/src/protobuf/proto/export.proto diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/trash_create.proto b/shared-lib/flowy-workspace-infra/src/protobuf/proto/trash_create.proto similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/trash_create.proto rename to shared-lib/flowy-workspace-infra/src/protobuf/proto/trash_create.proto diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/view_create.proto b/shared-lib/flowy-workspace-infra/src/protobuf/proto/view_create.proto similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/view_create.proto rename to shared-lib/flowy-workspace-infra/src/protobuf/proto/view_create.proto diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/view_query.proto b/shared-lib/flowy-workspace-infra/src/protobuf/proto/view_query.proto similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/view_query.proto rename to shared-lib/flowy-workspace-infra/src/protobuf/proto/view_query.proto diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/view_update.proto b/shared-lib/flowy-workspace-infra/src/protobuf/proto/view_update.proto similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/view_update.proto rename to shared-lib/flowy-workspace-infra/src/protobuf/proto/view_update.proto diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/workspace_create.proto b/shared-lib/flowy-workspace-infra/src/protobuf/proto/workspace_create.proto similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/workspace_create.proto rename to shared-lib/flowy-workspace-infra/src/protobuf/proto/workspace_create.proto diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/workspace_query.proto b/shared-lib/flowy-workspace-infra/src/protobuf/proto/workspace_query.proto similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/workspace_query.proto rename to shared-lib/flowy-workspace-infra/src/protobuf/proto/workspace_query.proto diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/workspace_setting.proto b/shared-lib/flowy-workspace-infra/src/protobuf/proto/workspace_setting.proto similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/workspace_setting.proto rename to shared-lib/flowy-workspace-infra/src/protobuf/proto/workspace_setting.proto diff --git a/frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/workspace_update.proto b/shared-lib/flowy-workspace-infra/src/protobuf/proto/workspace_update.proto similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/protobuf/proto/workspace_update.proto rename to shared-lib/flowy-workspace-infra/src/protobuf/proto/workspace_update.proto diff --git a/frontend/rust-lib/flowy-workspace-infra/src/user_default.rs b/shared-lib/flowy-workspace-infra/src/user_default.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace-infra/src/user_default.rs rename to shared-lib/flowy-workspace-infra/src/user_default.rs diff --git a/frontend/rust-lib/lib-ot/Cargo.toml b/shared-lib/lib-ot/Cargo.toml similarity index 100% rename from frontend/rust-lib/lib-ot/Cargo.toml rename to shared-lib/lib-ot/Cargo.toml diff --git a/frontend/rust-lib/lib-ot/src/core/attributes/attribute.rs b/shared-lib/lib-ot/src/core/attributes/attribute.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/attributes/attribute.rs rename to shared-lib/lib-ot/src/core/attributes/attribute.rs diff --git a/frontend/rust-lib/lib-ot/src/core/attributes/attributes.rs b/shared-lib/lib-ot/src/core/attributes/attributes.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/attributes/attributes.rs rename to shared-lib/lib-ot/src/core/attributes/attributes.rs diff --git a/frontend/rust-lib/lib-ot/src/core/attributes/attributes_serde.rs b/shared-lib/lib-ot/src/core/attributes/attributes_serde.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/attributes/attributes_serde.rs rename to shared-lib/lib-ot/src/core/attributes/attributes_serde.rs diff --git a/frontend/rust-lib/lib-ot/src/core/attributes/builder.rs b/shared-lib/lib-ot/src/core/attributes/builder.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/attributes/builder.rs rename to shared-lib/lib-ot/src/core/attributes/builder.rs diff --git a/frontend/rust-lib/lib-ot/src/core/attributes/macros.rs b/shared-lib/lib-ot/src/core/attributes/macros.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/attributes/macros.rs rename to shared-lib/lib-ot/src/core/attributes/macros.rs diff --git a/frontend/rust-lib/lib-ot/src/core/attributes/mod.rs b/shared-lib/lib-ot/src/core/attributes/mod.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/attributes/mod.rs rename to shared-lib/lib-ot/src/core/attributes/mod.rs diff --git a/frontend/rust-lib/lib-ot/src/core/delta/builder.rs b/shared-lib/lib-ot/src/core/delta/builder.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/delta/builder.rs rename to shared-lib/lib-ot/src/core/delta/builder.rs diff --git a/frontend/rust-lib/lib-ot/src/core/delta/cursor.rs b/shared-lib/lib-ot/src/core/delta/cursor.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/delta/cursor.rs rename to shared-lib/lib-ot/src/core/delta/cursor.rs diff --git a/frontend/rust-lib/lib-ot/src/core/delta/delta.rs b/shared-lib/lib-ot/src/core/delta/delta.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/delta/delta.rs rename to shared-lib/lib-ot/src/core/delta/delta.rs diff --git a/frontend/rust-lib/lib-ot/src/core/delta/delta_serde.rs b/shared-lib/lib-ot/src/core/delta/delta_serde.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/delta/delta_serde.rs rename to shared-lib/lib-ot/src/core/delta/delta_serde.rs diff --git a/frontend/rust-lib/lib-ot/src/core/delta/iterator.rs b/shared-lib/lib-ot/src/core/delta/iterator.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/delta/iterator.rs rename to shared-lib/lib-ot/src/core/delta/iterator.rs diff --git a/frontend/rust-lib/lib-ot/src/core/delta/mod.rs b/shared-lib/lib-ot/src/core/delta/mod.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/delta/mod.rs rename to shared-lib/lib-ot/src/core/delta/mod.rs diff --git a/frontend/rust-lib/lib-ot/src/core/flowy_str.rs b/shared-lib/lib-ot/src/core/flowy_str.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/flowy_str.rs rename to shared-lib/lib-ot/src/core/flowy_str.rs diff --git a/frontend/rust-lib/lib-ot/src/core/interval.rs b/shared-lib/lib-ot/src/core/interval.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/interval.rs rename to shared-lib/lib-ot/src/core/interval.rs diff --git a/frontend/rust-lib/lib-ot/src/core/mod.rs b/shared-lib/lib-ot/src/core/mod.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/mod.rs rename to shared-lib/lib-ot/src/core/mod.rs diff --git a/frontend/rust-lib/lib-ot/src/core/operation/builder.rs b/shared-lib/lib-ot/src/core/operation/builder.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/operation/builder.rs rename to shared-lib/lib-ot/src/core/operation/builder.rs diff --git a/frontend/rust-lib/lib-ot/src/core/operation/mod.rs b/shared-lib/lib-ot/src/core/operation/mod.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/operation/mod.rs rename to shared-lib/lib-ot/src/core/operation/mod.rs diff --git a/frontend/rust-lib/lib-ot/src/core/operation/operation.rs b/shared-lib/lib-ot/src/core/operation/operation.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/operation/operation.rs rename to shared-lib/lib-ot/src/core/operation/operation.rs diff --git a/frontend/rust-lib/lib-ot/src/core/operation/operation_serde.rs b/shared-lib/lib-ot/src/core/operation/operation_serde.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/core/operation/operation_serde.rs rename to shared-lib/lib-ot/src/core/operation/operation_serde.rs diff --git a/frontend/rust-lib/lib-ot/src/errors.rs b/shared-lib/lib-ot/src/errors.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/errors.rs rename to shared-lib/lib-ot/src/errors.rs diff --git a/frontend/rust-lib/lib-ot/src/lib.rs b/shared-lib/lib-ot/src/lib.rs similarity index 100% rename from frontend/rust-lib/lib-ot/src/lib.rs rename to shared-lib/lib-ot/src/lib.rs diff --git a/frontend/rust-lib/lib-ws/Cargo.toml b/shared-lib/lib-ws/Cargo.toml similarity index 93% rename from frontend/rust-lib/lib-ws/Cargo.toml rename to shared-lib/lib-ws/Cargo.toml index 1deef5e0a7..55de5a1af8 100644 --- a/frontend/rust-lib/lib-ws/Cargo.toml +++ b/shared-lib/lib-ws/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" [dependencies] flowy-derive = { path = "../flowy-derive" } backend-service = { path = "../backend-service" } -lib-infra = { path = "../lib-infra" } +lib-infra = { path = "../../frontend/rust-lib/lib-infra" } tokio-tungstenite = "0.15" futures-util = "0.3.17" diff --git a/frontend/rust-lib/lib-ws/Flowy.toml b/shared-lib/lib-ws/Flowy.toml similarity index 100% rename from frontend/rust-lib/lib-ws/Flowy.toml rename to shared-lib/lib-ws/Flowy.toml diff --git a/frontend/rust-lib/lib-ws/src/connect.rs b/shared-lib/lib-ws/src/connect.rs similarity index 100% rename from frontend/rust-lib/lib-ws/src/connect.rs rename to shared-lib/lib-ws/src/connect.rs diff --git a/frontend/rust-lib/lib-ws/src/errors.rs b/shared-lib/lib-ws/src/errors.rs similarity index 100% rename from frontend/rust-lib/lib-ws/src/errors.rs rename to shared-lib/lib-ws/src/errors.rs diff --git a/frontend/rust-lib/lib-ws/src/lib.rs b/shared-lib/lib-ws/src/lib.rs similarity index 100% rename from frontend/rust-lib/lib-ws/src/lib.rs rename to shared-lib/lib-ws/src/lib.rs diff --git a/frontend/rust-lib/lib-ws/src/msg.rs b/shared-lib/lib-ws/src/msg.rs similarity index 100% rename from frontend/rust-lib/lib-ws/src/msg.rs rename to shared-lib/lib-ws/src/msg.rs diff --git a/frontend/rust-lib/lib-ws/src/protobuf/mod.rs b/shared-lib/lib-ws/src/protobuf/mod.rs similarity index 100% rename from frontend/rust-lib/lib-ws/src/protobuf/mod.rs rename to shared-lib/lib-ws/src/protobuf/mod.rs diff --git a/frontend/rust-lib/lib-ws/src/protobuf/model/errors.rs b/shared-lib/lib-ws/src/protobuf/model/errors.rs similarity index 100% rename from frontend/rust-lib/lib-ws/src/protobuf/model/errors.rs rename to shared-lib/lib-ws/src/protobuf/model/errors.rs diff --git a/frontend/rust-lib/lib-ws/src/protobuf/model/mod.rs b/shared-lib/lib-ws/src/protobuf/model/mod.rs similarity index 100% rename from frontend/rust-lib/lib-ws/src/protobuf/model/mod.rs rename to shared-lib/lib-ws/src/protobuf/model/mod.rs diff --git a/frontend/rust-lib/lib-ws/src/protobuf/model/msg.rs b/shared-lib/lib-ws/src/protobuf/model/msg.rs similarity index 100% rename from frontend/rust-lib/lib-ws/src/protobuf/model/msg.rs rename to shared-lib/lib-ws/src/protobuf/model/msg.rs diff --git a/frontend/rust-lib/lib-ws/src/protobuf/proto/errors.proto b/shared-lib/lib-ws/src/protobuf/proto/errors.proto similarity index 100% rename from frontend/rust-lib/lib-ws/src/protobuf/proto/errors.proto rename to shared-lib/lib-ws/src/protobuf/proto/errors.proto diff --git a/frontend/rust-lib/lib-ws/src/protobuf/proto/msg.proto b/shared-lib/lib-ws/src/protobuf/proto/msg.proto similarity index 100% rename from frontend/rust-lib/lib-ws/src/protobuf/proto/msg.proto rename to shared-lib/lib-ws/src/protobuf/proto/msg.proto diff --git a/frontend/rust-lib/lib-ws/src/ws.rs b/shared-lib/lib-ws/src/ws.rs similarity index 100% rename from frontend/rust-lib/lib-ws/src/ws.rs rename to shared-lib/lib-ws/src/ws.rs diff --git a/shared-lib/rust-toolchain b/shared-lib/rust-toolchain new file mode 100644 index 0000000000..e6fe48400e --- /dev/null +++ b/shared-lib/rust-toolchain @@ -0,0 +1,4 @@ +[toolchain] +#rustup override set nightly-2021-04-24 +channel = "nightly-2021-04-24" +targets = [ "aarch64-apple-darwin", "x86_64-apple-darwin", "aarch64-apple-ios", "x86_64-apple-ios" ] \ No newline at end of file diff --git a/shared-lib/rustfmt.toml b/shared-lib/rustfmt.toml new file mode 100644 index 0000000000..f236ee21e8 --- /dev/null +++ b/shared-lib/rustfmt.toml @@ -0,0 +1,18 @@ +# https://rust-lang.github.io/rustfmt/?version=master&search= +max_width = 120 +tab_spaces = 4 +fn_single_line = true +match_block_trailing_comma = true +normalize_comments = true +wrap_comments = true +use_field_init_shorthand = true +use_try_shorthand = true +normalize_doc_attributes = true +report_todo = "Always" +report_fixme = "Always" +imports_layout = "HorizontalVertical" +merge_imports = true +reorder_modules = true +reorder_imports = true +enum_discrim_align_threshold = 20 +edition = "2018"