privchat_protocol/version.rs
1// Copyright 2025 Shanghai Boyu Information Technology Co., Ltd.
2// https://privchat.dev
3//
4// Author: zoujiaqing <zoujiaqing@gmail.com>
5//
6// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
9//
10// http://www.apache.org/licenses/LICENSE-2.0
11//
12// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS,
14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
17
18//! 协议版本
19//!
20//! 从 Cargo.toml 的 package.version 获取,供连接认证等使用。
21
22/// 协议库版本(与 Cargo.toml 中 package.version 一致)
23pub const VERSION: &str = env!("CARGO_PKG_VERSION");
24
25/// 协议版本号(用于兼容性判断的数值,当前为 1)
26pub const PROTOCOL_VERSION: u8 = 1;