diff --git a/vrpc-py/README.md b/vrpc-py/README.md index 4ea6727..8c6d884 100644 --- a/vrpc-py/README.md +++ b/vrpc-py/README.md @@ -1,4 +1,4 @@ -# vmp-py - Vuer Message Protocol (Python) +# vuer-rpc - Vuer Message Protocol (Python) A lightweight, cross-language messaging and RPC protocol designed for use with Vuer and Zaku. @@ -15,13 +15,13 @@ A lightweight, cross-language messaging and RPC protocol designed for use with V Using uv (recommended): ```bash -uv pip install vmp-py +uv pip install vuer-rpc ``` Using pip: ```bash -pip install vmp-py +pip install vuer-rpc ``` ### Optional Dependencies @@ -30,22 +30,22 @@ Install with specific features: ```bash # For PyTorch support -uv pip install "vmp-py[torch]" +uv pip install "vuer-rpc[torch]" # For PIL/Pillow support -uv pip install "vmp-py[image]" +uv pip install "vuer-rpc[image]" # For safetensors support -uv pip install "vmp-py[safetensors]" +uv pip install "vuer-rpc[safetensors]" # For all extensions (torch, PIL, safetensors) -uv pip install "vmp-py[extensions]" +uv pip install "vuer-rpc[extensions]" # For development (includes pytest + all extensions) -uv pip install "vmp-py[dev]" +uv pip install "vuer-rpc[dev]" # Install everything -uv pip install "vmp-py[all]" +uv pip install "vuer-rpc[all]" ``` ## Quick Start @@ -114,7 +114,7 @@ print(decoded_event["data"]["data"]) # numpy array restored ## Optional Type Extensions -vmp-py uses an extensible type registry system. NumPy is supported by default, but you can enable support for additional types by importing their extensions. +vuer-rpc uses an extensible type registry system. NumPy is supported by default, but you can enable support for additional types by importing their extensions. ### Using PyTorch @@ -209,7 +209,7 @@ decoded = ZData.decode(encoded) ### Extending the Registry in External Libraries -Library authors can register their types with vmp-py's global `TYPE_REGISTRY`. This allows seamless integration without requiring users to manually register types. +Library authors can register their types with vuer-rpc's global `TYPE_REGISTRY`. This allows seamless integration without requiring users to manually register types. **Example: Creating a VMP extension library** @@ -261,7 +261,7 @@ decoded = ZData.decode(encoded) **Best practices for library authors:** 1. **Use namespaced ztype names**: `"your_library.TypeName"` prevents collisions -2. **Make VMP support optional**: Don't require vmp-py as a hard dependency +2. **Make VMP support optional**: Don't require vuer-rpc as a hard dependency 3. **Document the import**: Tell users to import your `vmp_support` module 4. **Version your ztypes**: Use `"your_library.v1.TypeName"` if your format may change 5. **Access TYPE_REGISTRY directly**: Import from `vmp_py.type_registry` for type hints @@ -398,7 +398,7 @@ data = json_ser.decode(json_bytes) ```bash # Clone the repository git clone https://github.com/yourusername/vuer-message-protocol.git -cd vuer-message-protocol/vmp-py +cd vuer-message-protocol/vuer-rpc # Install with all dependencies uv sync --all-extras diff --git a/vrpc-py/examples/basic_usage.py b/vrpc-py/examples/basic_usage.py index 138122a..6ea8e62 100644 --- a/vrpc-py/examples/basic_usage.py +++ b/vrpc-py/examples/basic_usage.py @@ -1,5 +1,5 @@ """ -Basic usage examples for vmp-py. +Basic usage examples for vuer-rpc. Demonstrates: - ZData encoding/decoding @@ -9,7 +9,7 @@ """ import numpy as np -from vuer_vrpc import ( +from vuer_rpc import ( ZData, MessagePackSerializer, set_event, diff --git a/vrpc-py/examples/registry_extensions.py b/vrpc-py/examples/registry_extensions.py index 508a6b1..0563633 100644 --- a/vrpc-py/examples/registry_extensions.py +++ b/vrpc-py/examples/registry_extensions.py @@ -1,5 +1,5 @@ """ -Advanced registry and extensions examples for vmp-py. +Advanced registry and extensions examples for vuer-rpc. Demonstrates: - Using optional type extensions (torch, PIL, safetensors) @@ -9,7 +9,7 @@ """ import numpy as np -from vuer_vrpc import ZData, TYPE_REGISTRY, MessagePackSerializer +from vuer_rpc import ZData, TYPE_REGISTRY, MessagePackSerializer def example_list_types(): @@ -24,7 +24,7 @@ def example_torch_extension(): try: # Import extension to enable torch support - from vuer_vrpc.extensions import torch_support # noqa: F401 + from vuer_rpc.extensions import torch_support # noqa: F401 import torch print("✓ PyTorch extension loaded") @@ -44,7 +44,7 @@ def example_torch_extension(): print("✓ Round-trip successful!") except ImportError: - print("⚠ PyTorch not installed. Install with: uv pip install 'vmp-py[torch]'") + print("⚠ PyTorch not installed. Install with: uv pip install 'vuer-rpc[torch]'") def example_image_extension(): @@ -52,7 +52,7 @@ def example_image_extension(): print("\n=== PIL Image Extension ===") try: - from vuer_vrpc.extensions import image_support # noqa: F401 + from vuer_rpc.extensions import image_support # noqa: F401 from PIL import Image print("✓ PIL extension loaded") @@ -70,7 +70,7 @@ def example_image_extension(): print("✓ Round-trip successful!") except ImportError: - print("⚠ PIL not installed. Install with: uv pip install 'vmp-py[image]'") + print("⚠ PIL not installed. Install with: uv pip install 'vuer-rpc[image]'") def example_safetensors_extension(): @@ -78,8 +78,8 @@ def example_safetensors_extension(): print("\n=== Safetensors Extension ===") try: - from vuer_vrpc.extensions import safetensors_support # noqa: F401 - from vuer_vrpc.extensions.safetensors_support import encode_as_safetensor + from vuer_rpc.extensions import safetensors_support # noqa: F401 + from vuer_rpc.extensions.safetensors_support import encode_as_safetensor print("✓ Safetensors extension loaded") @@ -109,7 +109,7 @@ def example_safetensors_extension(): print("✓ Round-trip successful!") except ImportError: - print("⚠ Safetensors not installed. Install with: uv pip install 'vmp-py[safetensors]'") + print("⚠ Safetensors not installed. Install with: uv pip install 'vuer-rpc[safetensors]'") def example_custom_type(): @@ -211,7 +211,7 @@ def example_mixed_types_serialization(): # Try to import all extensions try: - from vuer_vrpc.extensions import torch_support, image_support # noqa: F401 + from vuer_rpc.extensions import torch_support, image_support # noqa: F401 import torch from PIL import Image @@ -243,7 +243,7 @@ def example_mixed_types_serialization(): except ImportError as e: print(f"⚠ Some extensions not available: {e}") - print(" Install with: uv pip install 'vmp-py[all]'") + print(" Install with: uv pip install 'vuer-rpc[all]'") def main(): diff --git a/vrpc-py/pyproject.toml b/vrpc-py/pyproject.toml index 30314ce..1344b18 100644 --- a/vrpc-py/pyproject.toml +++ b/vrpc-py/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "vuer-vrpc" +name = "vuer-rpc" version = "0.1.0" description = "Vuer RPC (vRPC) - Python implementation for cross-language messaging and RPC" readme = "README.md" @@ -52,7 +52,7 @@ addopts = [ ] [tool.coverage.run] -source = ["vuer_vrpc"] +source = ["vuer_rpc"] omit = ["*/tests/*"] [tool.coverage.report] diff --git a/vrpc-py/src/vuer_vrpc/__init__.py b/vrpc-py/src/vuer_rpc/__init__.py similarity index 100% rename from vrpc-py/src/vuer_vrpc/__init__.py rename to vrpc-py/src/vuer_rpc/__init__.py diff --git a/vrpc-py/src/vuer_vrpc/builtin_types.py b/vrpc-py/src/vuer_rpc/builtin_types.py similarity index 100% rename from vrpc-py/src/vuer_vrpc/builtin_types.py rename to vrpc-py/src/vuer_rpc/builtin_types.py diff --git a/vrpc-py/src/vuer_vrpc/events.py b/vrpc-py/src/vuer_rpc/events.py similarity index 100% rename from vrpc-py/src/vuer_vrpc/events.py rename to vrpc-py/src/vuer_rpc/events.py diff --git a/vrpc-py/src/vuer_vrpc/extensions/__init__.py b/vrpc-py/src/vuer_rpc/extensions/__init__.py similarity index 100% rename from vrpc-py/src/vuer_vrpc/extensions/__init__.py rename to vrpc-py/src/vuer_rpc/extensions/__init__.py diff --git a/vrpc-py/src/vuer_vrpc/extensions/image_support.py b/vrpc-py/src/vuer_rpc/extensions/image_support.py similarity index 94% rename from vrpc-py/src/vuer_vrpc/extensions/image_support.py rename to vrpc-py/src/vuer_rpc/extensions/image_support.py index b3f5915..a093b1d 100644 --- a/vrpc-py/src/vuer_vrpc/extensions/image_support.py +++ b/vrpc-py/src/vuer_rpc/extensions/image_support.py @@ -16,7 +16,7 @@ PIL_AVAILABLE = False raise ImportError( "Pillow is not installed. Install it with: " - "uv pip install 'vmp-py[image]' or pip install Pillow" + "uv pip install 'vuer-rpc[image]' or pip install Pillow" ) diff --git a/vrpc-py/src/vuer_vrpc/extensions/safetensors_support.py b/vrpc-py/src/vuer_rpc/extensions/safetensors_support.py similarity index 97% rename from vrpc-py/src/vuer_vrpc/extensions/safetensors_support.py rename to vrpc-py/src/vuer_rpc/extensions/safetensors_support.py index 06ff80f..ac167df 100644 --- a/vrpc-py/src/vuer_vrpc/extensions/safetensors_support.py +++ b/vrpc-py/src/vuer_rpc/extensions/safetensors_support.py @@ -17,7 +17,7 @@ SAFETENSORS_AVAILABLE = False raise ImportError( "Safetensors is not installed. Install it with: " - "uv pip install 'vmp-py[safetensors]' or pip install safetensors" + "uv pip install 'vuer-rpc[safetensors]' or pip install safetensors" ) diff --git a/vrpc-py/src/vuer_vrpc/extensions/torch_support.py b/vrpc-py/src/vuer_rpc/extensions/torch_support.py similarity index 95% rename from vrpc-py/src/vuer_vrpc/extensions/torch_support.py rename to vrpc-py/src/vuer_rpc/extensions/torch_support.py index 50fff50..e82d9a4 100644 --- a/vrpc-py/src/vuer_vrpc/extensions/torch_support.py +++ b/vrpc-py/src/vuer_rpc/extensions/torch_support.py @@ -16,7 +16,7 @@ TORCH_AVAILABLE = False raise ImportError( "PyTorch is not installed. Install it with: " - "uv pip install 'vmp-py[torch]' or pip install torch" + "uv pip install 'vuer-rpc[torch]' or pip install torch" ) diff --git a/vrpc-py/src/vuer_vrpc/py.typed b/vrpc-py/src/vuer_rpc/py.typed similarity index 100% rename from vrpc-py/src/vuer_vrpc/py.typed rename to vrpc-py/src/vuer_rpc/py.typed diff --git a/vrpc-py/src/vuer_vrpc/serializers.py b/vrpc-py/src/vuer_rpc/serializers.py similarity index 100% rename from vrpc-py/src/vuer_vrpc/serializers.py rename to vrpc-py/src/vuer_rpc/serializers.py diff --git a/vrpc-py/src/vuer_vrpc/type_registry.py b/vrpc-py/src/vuer_rpc/type_registry.py similarity index 100% rename from vrpc-py/src/vuer_vrpc/type_registry.py rename to vrpc-py/src/vuer_rpc/type_registry.py diff --git a/vrpc-py/src/vuer_vrpc/types.py b/vrpc-py/src/vuer_rpc/types.py similarity index 100% rename from vrpc-py/src/vuer_vrpc/types.py rename to vrpc-py/src/vuer_rpc/types.py diff --git a/vrpc-py/src/vuer_vrpc/zdata.py b/vrpc-py/src/vuer_rpc/zdata.py similarity index 100% rename from vrpc-py/src/vuer_vrpc/zdata.py rename to vrpc-py/src/vuer_rpc/zdata.py diff --git a/vrpc-py/tests/__init__.py b/vrpc-py/tests/__init__.py index 46e4e7a..d96dd44 100644 --- a/vrpc-py/tests/__init__.py +++ b/vrpc-py/tests/__init__.py @@ -1 +1 @@ -"""Tests for vmp-py.""" +"""Tests for vuer-rpc.""" diff --git a/vrpc-py/tests/test_events.py b/vrpc-py/tests/test_events.py index 48682e5..cb369c7 100644 --- a/vrpc-py/tests/test_events.py +++ b/vrpc-py/tests/test_events.py @@ -3,7 +3,7 @@ """ import pytest -from vuer_vrpc import ( +from vuer_rpc import ( set_event, add_event, update_event, diff --git a/vrpc-py/tests/test_extensions.py b/vrpc-py/tests/test_extensions.py index 7670c40..e43c35f 100644 --- a/vrpc-py/tests/test_extensions.py +++ b/vrpc-py/tests/test_extensions.py @@ -4,7 +4,7 @@ import pytest import numpy as np -from vuer_vrpc import ZData, TYPE_REGISTRY +from vuer_rpc import ZData, TYPE_REGISTRY def test_list_registered_types(): @@ -18,7 +18,7 @@ def test_torch_extension(): """Test torch extension can be imported and works.""" pytest.importorskip("torch") import torch - from vuer_vrpc.extensions import torch_support # noqa: F401 + from vuer_rpc.extensions import torch_support # noqa: F401 # Check type is registered assert "torch.Tensor" in ZData.list_types() @@ -37,7 +37,7 @@ def test_image_extension(): """Test PIL image extension can be imported and works.""" pytest.importorskip("PIL") from PIL import Image - from vuer_vrpc.extensions import image_support # noqa: F401 + from vuer_rpc.extensions import image_support # noqa: F401 # Check type is registered assert "image" in ZData.list_types() @@ -55,8 +55,8 @@ def test_image_extension(): def test_safetensors_extension(): """Test safetensors extension can be imported and works.""" pytest.importorskip("safetensors") - from vuer_vrpc.extensions import safetensors_support - from vuer_vrpc.extensions.safetensors_support import encode_as_safetensor + from vuer_rpc.extensions import safetensors_support + from vuer_rpc.extensions.safetensors_support import encode_as_safetensor # Check type is registered assert "safetensor.dict" in ZData.list_types() @@ -111,8 +111,8 @@ def test_multiple_extensions_together(): pytest.importorskip("safetensors") from PIL import Image - from vuer_vrpc.extensions import torch_support, image_support, safetensors_support # noqa: F401, F811 - from vuer_vrpc.extensions.safetensors_support import encode_as_safetensor + from vuer_rpc.extensions import torch_support, image_support, safetensors_support # noqa: F401, F811 + from vuer_rpc.extensions.safetensors_support import encode_as_safetensor # Create mixed data data = { diff --git a/vrpc-py/tests/test_serializers.py b/vrpc-py/tests/test_serializers.py index d6c93e2..b465dee 100644 --- a/vrpc-py/tests/test_serializers.py +++ b/vrpc-py/tests/test_serializers.py @@ -4,7 +4,7 @@ import pytest import numpy as np -from vuer_vrpc import ( +from vuer_rpc import ( MessagePackSerializer, JSONSerializer, set_event, @@ -86,7 +86,7 @@ def test_msgpack_with_torch(): """Test MessagePack with PyTorch tensors.""" pytest.importorskip("torch") import torch - from vuer_vrpc.extensions import torch_support # noqa: F401 + from vuer_rpc.extensions import torch_support # noqa: F401 serializer = MessagePackSerializer(greedy=True) diff --git a/vrpc-py/tests/test_types.py b/vrpc-py/tests/test_types.py index 6ef59d7..5fd4624 100644 --- a/vrpc-py/tests/test_types.py +++ b/vrpc-py/tests/test_types.py @@ -3,7 +3,7 @@ """ import pytest -from vuer_vrpc import ( +from vuer_rpc import ( create_client_event, create_server_event, create_rpc_request, diff --git a/vrpc-py/tests/test_zdata.py b/vrpc-py/tests/test_zdata.py index 808e93a..cdca4ce 100644 --- a/vrpc-py/tests/test_zdata.py +++ b/vrpc-py/tests/test_zdata.py @@ -4,7 +4,7 @@ import pytest import numpy as np -from vuer_vrpc import ZData +from vuer_rpc import ZData def test_numpy_encode_decode(): @@ -49,7 +49,7 @@ def test_torch_encode_decode(): """Test encoding and decoding of PyTorch tensors.""" pytest.importorskip("torch") import torch - from vuer_vrpc.extensions import torch_support # noqa: F401 + from vuer_rpc.extensions import torch_support # noqa: F401 # Test 1D tensor tensor = torch.tensor([1, 2, 3, 4, 5]) @@ -77,7 +77,7 @@ def test_pil_image_encode_decode(): """Test encoding and decoding of PIL images.""" pytest.importorskip("PIL") from PIL import Image - from vuer_vrpc.extensions import image_support # noqa: F401 + from vuer_rpc.extensions import image_support # noqa: F401 # Create a simple RGB image img = Image.new('RGB', (100, 100), color='red') diff --git a/vrpc-py/uv.lock b/vrpc-py/uv.lock index 7046891..1a9fee8 100644 --- a/vrpc-py/uv.lock +++ b/vrpc-py/uv.lock @@ -689,7 +689,7 @@ wheels = [ ] [[package]] -name = "vuer-vrpc" +name = "vuer-rpc" version = "0.1.0" source = { editable = "." } dependencies = [ diff --git a/vrpc-rs/Cargo.toml b/vrpc-rs/Cargo.toml index e04e33f..5c333ec 100644 --- a/vrpc-rs/Cargo.toml +++ b/vrpc-rs/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "vmp-rs" +name = "vuer-rpc" version = "0.1.0" edition = "2024" authors = ["Ge Yang"] license = "MIT" description = "Rust implementation of the Vuer Message Protocol" repository = "https://github.com/vuer-ai/vuer-message-protocol" -keywords = ["vmp", "vrpc", "messagepack", "rpc", "serialization"] +keywords = ["vmp", "vuer", "vuer-rpc", "vrpc", "messagepack", "rpc", "serialization"] categories = ["encoding", "network-programming"] [dependencies] diff --git a/vrpc-rs/README.md b/vrpc-rs/README.md index cd52aaf..e233c6b 100644 --- a/vrpc-rs/README.md +++ b/vrpc-rs/README.md @@ -1,7 +1,7 @@ # VMP-RS: Rust Implementation of the Vuer Message Protocol -[![Crates.io](https://img.shields.io/crates/v/vmp-rs.svg)](https://crates.io/crates/vmp-rs) -[![Documentation](https://docs.rs/vmp-rs/badge.svg)](https://docs.rs/vmp-rs) +[![Crates.io](https://img.shields.io/crates/v/vuer-rpc.svg)](https://crates.io/crates/vuer-rpc) +[![Documentation](https://docs.rs/vuer-rpc/badge.svg)](https://docs.rs/vuer-rpc) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) A lightweight, cross-language messaging and RPC protocol designed for use with Vuer and Zaku. This is the Rust implementation with full support for MessagePack serialization, extensible type systems, and async RPC. @@ -22,19 +22,19 @@ Add this to your `Cargo.toml`: ```toml [dependencies] -vmp-rs = "0.1" +vuer-rpc = "0.1" # For async RPC support -vmp-rs = { version = "0.1", features = ["tokio"] } +vuer-rpc = { version = "0.1", features = ["tokio"] } # For all features including ndarray and image support -vmp-rs = { version = "0.1", features = ["full"] } +vuer-rpc = { version = "0.1", features = ["full"] } ``` ## Quick Start ```rust -use vmp_rs::prelude::*; +use vuer_rpc::prelude::*; use serde_json::json; fn main() -> Result<()> { @@ -104,7 +104,7 @@ let bytes = serialize_component(&scene)?; ## Async RPC (with Tokio) ```rust -use vmp_rs::prelude::*; +use vuer_rpc::prelude::*; use std::time::Duration; #[tokio::main] @@ -131,7 +131,7 @@ async fn main() -> Result<()> { The type registry allows you to encode/decode custom types that may not have native Rust equivalents: ```rust -use vmp_rs::prelude::*; +use vuer_rpc::prelude::*; use serde_json::json; fn main() { @@ -159,7 +159,7 @@ fn main() { ZData is a wrapper format for encoding types that don't have direct Rust equivalents (like NumPy arrays, PyTorch tensors, etc.): ```rust -use vmp_rs::prelude::*; +use vuer_rpc::prelude::*; // Create ZData for a custom type let zdata = ZData::new("custom.Type") @@ -177,7 +177,7 @@ let bytes = serialize(&zdata)?; With the `ndarray` feature: ```rust -use vmp_rs::prelude::*; +use vuer_rpc::prelude::*; use ndarray::Array; #[cfg(feature = "ndarray")] @@ -200,7 +200,7 @@ fn example() -> Result<()> { With the `image` feature: ```rust -use vmp_rs::prelude::*; +use vuer_rpc::prelude::*; use image::{DynamicImage, ImageFormat}; #[cfg(feature = "image")] @@ -217,7 +217,7 @@ fn example(img: DynamicImage) -> Result<()> { When a type is not available in the Rust environment, VMP-RS provides helpful error messages: ```rust -use vmp_rs::prelude::*; +use vuer_rpc::prelude::*; // This will return an error if the 'ndarray' feature is not enabled let result = decode_from_zdata::>(&zdata); @@ -329,7 +329,7 @@ See the [`examples/`](examples/) directory for complete working examples: ## Documentation -- [API Documentation](https://docs.rs/vmp-rs) +- [API Documentation](https://docs.rs/vuer-rpc) - [Protocol Specification](../README.md) - [Implementation Guide](../notes/IMPLEMENTATION_GUIDE.md) diff --git a/vrpc-rs/SUMMARY.md b/vrpc-rs/SUMMARY.md index c26cb09..1b6318b 100644 --- a/vrpc-rs/SUMMARY.md +++ b/vrpc-rs/SUMMARY.md @@ -74,7 +74,7 @@ Successfully implemented a full-featured Rust version of the Vuer Message Protoc ## Package Structure ``` -vmp-rs/ +vuer-rpc/ ├── Cargo.toml # Dependencies and features ├── README.md # User-facing documentation ├── SUMMARY.md # This file diff --git a/vrpc-rs/examples/basic_messages.rs b/vrpc-rs/examples/basic_messages.rs index 1b1ac27..ea19ece 100644 --- a/vrpc-rs/examples/basic_messages.rs +++ b/vrpc-rs/examples/basic_messages.rs @@ -2,7 +2,7 @@ //! //! Run with: cargo run --example basic_messages -use vmp_rs::prelude::*; +use vuer_rpc::prelude::*; use serde_json::json; fn main() -> Result<()> { diff --git a/vrpc-rs/src/lib.rs b/vrpc-rs/src/lib.rs index 030cec1..59d85c2 100644 --- a/vrpc-rs/src/lib.rs +++ b/vrpc-rs/src/lib.rs @@ -15,24 +15,25 @@ //! # Quick Start //! //! ```rust -//! use vmp_rs::prelude::*; +//! use vuer_rpc::prelude::*; //! use serde_json::json; //! //! // Create a message //! let msg = Message::new("CLICK") -//! .with_value(json!({"x": 100, "y": 200})); +//! .with_data(json!("simple data")); //! //! // Serialize to MessagePack //! let bytes = serialize_message(&msg).unwrap(); //! //! // Deserialize //! let restored: Message = deserialize_message(&bytes).unwrap(); +//! assert_eq!(msg.etype, restored.etype); //! ``` //! //! # RPC Example //! //! ```rust,ignore -//! use vmp_rs::prelude::*; +//! use vuer_rpc::prelude::*; //! use std::time::Duration; //! //! #[tokio::main] @@ -56,7 +57,7 @@ //! # Custom Types //! //! ```rust -//! use vmp_rs::prelude::*; +//! use vuer_rpc::prelude::*; //! use serde_json::json; //! //! // Register a custom type diff --git a/vrpc-ts/README.md b/vrpc-ts/README.md index 2a0c12b..d76fcc1 100644 --- a/vrpc-ts/README.md +++ b/vrpc-ts/README.md @@ -1,4 +1,4 @@ -# @vuer-ai/vrpc +# @vuer-ai/vuer-rpc TypeScript implementation of Vuer RPC (vRPC) - a lightweight, cross-language messaging and RPC protocol. @@ -13,7 +13,7 @@ TypeScript implementation of Vuer RPC (vRPC) - a lightweight, cross-language mes ## Installation ```bash -pnpm add @vuer-ai/vrpc +pnpm add @vuer-ai/vuer-rpc ``` ## Quick Start @@ -21,7 +21,7 @@ pnpm add @vuer-ai/vrpc ### Basic Message Serialization ```typescript -import { serialize, deserialize } from '@vuer-ai/vrpc'; +import { serialize, deserialize } from '@vuer-ai/vuer-rpc'; // Create and serialize a message const message = { @@ -37,7 +37,7 @@ const decoded = deserialize(binary); ### RPC Communication ```typescript -import { RPCManager, serialize, deserialize } from '@vuer-ai/vrpc'; +import { RPCManager, serialize, deserialize } from '@vuer-ai/vuer-rpc'; const rpcManager = new RPCManager(); @@ -66,7 +66,7 @@ websocket.on('message', (data) => { ### Custom ZData Types ```typescript -import { registerZDataType, serialize, deserialize } from '@vuer-ai/vrpc'; +import { registerZDataType, serialize, deserialize } from '@vuer-ai/vuer-rpc'; // Register a custom type for Date objects registerZDataType({ @@ -103,7 +103,7 @@ const decoded = deserialize(binary); ### React Integration ```typescript -import { useMessageHandler, useRPC } from '@vuer-ai/vrpc'; +import { useMessageHandler, useRPC } from '@vuer-ai/vuer-rpc'; import { useState, useEffect } from 'react'; function VuerClient() { diff --git a/vrpc-ts/package.json b/vrpc-ts/package.json index 7b3aa9c..049d670 100644 --- a/vrpc-ts/package.json +++ b/vrpc-ts/package.json @@ -1,5 +1,5 @@ { - "name": "@vuer-ai/vrpc", + "name": "@vuer-ai/vuer-rpc", "version": "0.1.0", "description": "Vuer RPC (vRPC) - TypeScript implementation for cross-language messaging and RPC", "type": "module", @@ -26,7 +26,7 @@ }, "keywords": [ "vuer", - "vrpc", + "vuer-rpc", "messagepack", "rpc", "protocol",