Skip to content

Commit

Permalink
Update protocol to v2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
owent committed Jan 20, 2023
1 parent dafacde commit 7643a69
Show file tree
Hide file tree
Showing 10 changed files with 124 additions and 32 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,14 @@ jobs:
cargo fmt --all -- --check
cargo clippy
- name: Cache prebuilt and cargo
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/prebuilt
~/.cargo
!~/prebuilt/exclude
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
# - name: Generate coverage
Expand Down Expand Up @@ -114,11 +117,14 @@ jobs:
env:
RUSTFLAGS: "-C link-dead-code"
- name: Cache prebuilt and cargo
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/prebuilt
~/.cargo
!~/prebuilt/exclude
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
- name: Package
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Mark and close stale issues"
on:
schedule:
- cron: "30 2 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v7
with:
stale-issue-message: "This issue was marked as stale due to lack of activity."
days-before-issue-stale: 90
exempt-issue-labels: "do-not-stale"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 xresloader
Copyright (c) 2023 xresloader

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ You can use environment `RUST_LOG=<level>` to control log level and `RUST_LOG_ST

Example output: `./xresloader-dump-bin -p ./sample-conf/kind.pb -b ./sample-data/role_upgrade_cfg.bin` (Without `--pretty`)

```
```bash
======================== Header: .\sample-data\role_upgrade_cfg.bin ========================
xresloader version: 2.8.0
data version: 2.8.0.20200609192757
Expand Down
4 changes: 2 additions & 2 deletions src/exec/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xresloader-dump-bin"
version = "2.0.0"
version = "2.1.0"
authors = ["owent <[email protected]>"]
license = "MIT"
description = "A tool to dump human readable text from binary output of xresloader"
Expand All @@ -22,5 +22,5 @@ bytes = { version = "1" }
log = "0.*"
env_logger = "0.*"
json = "0.*"
clap = { version = "3", features = ["derive"] }
clap = { version = "4", features = ["derive"] }
xresloader-protocol = { path = "../protocol" }
2 changes: 1 addition & 1 deletion src/protocol/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xresloader-protocol"
version = "2.0.0"
version = "2.1.0"
authors = ["owent <[email protected]>"]
license = "MIT"
description = "A tool to dump human readable text from binary output of xresloader"
Expand Down
4 changes: 2 additions & 2 deletions src/protocol/src/proto/pb_header_v3.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file is generated by rust-protobuf 3.1.0. Do not edit
// This file is generated by rust-protobuf 3.2.0. Do not edit
// .proto file is parsed by protoc 3.19.4
// @generated

Expand All @@ -23,7 +23,7 @@

/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0;
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0;

#[derive(PartialEq,Clone,Default,Debug)]
// @@protoc_insertion_point(message:org.xresloader.pb.xresloader_data_source)
Expand Down
23 changes: 13 additions & 10 deletions src/protocol/src/proto/xresloader.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file is generated by rust-protobuf 3.1.0. Do not edit
// This file is generated by rust-protobuf 3.2.0. Do not edit
// .proto file is parsed by protoc 3.19.4
// @generated

Expand All @@ -23,7 +23,7 @@

/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0;
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0;

/// Extension fields
pub mod exts {
Expand All @@ -48,6 +48,8 @@ pub mod exts {

pub const field_required: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(1015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);

pub const field_origin_value: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(1016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);

pub const oneof_description: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::OneofOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(1001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);

pub const oneof_separator: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::OneofOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(1002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
Expand Down Expand Up @@ -75,14 +77,15 @@ static file_descriptor_proto_data: &'static [u8] = b"\
uf.FieldOptionsR\nfieldRatio:G\n\x0ffield_separator\x18\xf6\x07\x20\x01(\
\t\x12\x1d.google.protobuf.FieldOptionsR\x0efieldSeparator:E\n\x0efield_\
required\x18\xf7\x07\x20\x01(\x08\x12\x1d.google.protobuf.FieldOptionsR\
\rfieldRequired:K\n\x11oneof_description\x18\xe9\x07\x20\x01(\t\x12\x1d.\
google.protobuf.OneofOptionsR\x10oneofDescription:G\n\x0foneof_separator\
\x18\xea\x07\x20\x01(\t\x12\x1d.google.protobuf.OneofOptionsR\x0eoneofSe\
parator:H\n\x10enum_description\x18\xe9\x07\x20\x01(\t\x12\x1c.google.pr\
otobuf.EnumOptionsR\x0fenumDescription:O\n\x11enumv_description\x18\xe9\
\x07\x20\x01(\t\x12!.google.protobuf.EnumValueOptionsR\x10enumvDescripti\
on:A\n\nenum_alias\x18\xea\x07\x20\x01(\t\x12!.google.protobuf.EnumValue\
OptionsR\tenumAliasb\x06proto3\
\rfieldRequired:L\n\x12field_origin_value\x18\xf8\x07\x20\x01(\t\x12\x1d\
.google.protobuf.FieldOptionsR\x10fieldOriginValue:K\n\x11oneof_descript\
ion\x18\xe9\x07\x20\x01(\t\x12\x1d.google.protobuf.OneofOptionsR\x10oneo\
fDescription:G\n\x0foneof_separator\x18\xea\x07\x20\x01(\t\x12\x1d.googl\
e.protobuf.OneofOptionsR\x0eoneofSeparator:H\n\x10enum_description\x18\
\xe9\x07\x20\x01(\t\x12\x1c.google.protobuf.EnumOptionsR\x0fenumDescript\
ion:O\n\x11enumv_description\x18\xe9\x07\x20\x01(\t\x12!.google.protobuf\
.EnumValueOptionsR\x10enumvDescription:A\n\nenum_alias\x18\xea\x07\x20\
\x01(\t\x12!.google.protobuf.EnumValueOptionsR\tenumAliasb\x06proto3\
";

/// `FileDescriptorProto` object which was a source for this generated file
Expand Down
89 changes: 79 additions & 10 deletions src/protocol/src/proto/xresloader_ue.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file is generated by rust-protobuf 3.1.0. Do not edit
// This file is generated by rust-protobuf 3.2.0. Do not edit
// .proto file is parsed by protoc 3.19.4
// @generated

Expand All @@ -23,7 +23,65 @@

/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0;
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0;

#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:org.xresloader.ue.loader_mode)
pub enum Loader_mode {
// @@protoc_insertion_point(enum_value:org.xresloader.ue.loader_mode.EN_LOADER_MODE_DEFAULT)
EN_LOADER_MODE_DEFAULT = 0,
// @@protoc_insertion_point(enum_value:org.xresloader.ue.loader_mode.EN_LOADER_MODE_ENABLE)
EN_LOADER_MODE_ENABLE = 1,
// @@protoc_insertion_point(enum_value:org.xresloader.ue.loader_mode.EN_LOADER_MODE_DISABLE)
EN_LOADER_MODE_DISABLE = 2,
}

impl ::protobuf::Enum for Loader_mode {
const NAME: &'static str = "loader_mode";

fn value(&self) -> i32 {
*self as i32
}

fn from_i32(value: i32) -> ::std::option::Option<Loader_mode> {
match value {
0 => ::std::option::Option::Some(Loader_mode::EN_LOADER_MODE_DEFAULT),
1 => ::std::option::Option::Some(Loader_mode::EN_LOADER_MODE_ENABLE),
2 => ::std::option::Option::Some(Loader_mode::EN_LOADER_MODE_DISABLE),
_ => ::std::option::Option::None
}
}

const VALUES: &'static [Loader_mode] = &[
Loader_mode::EN_LOADER_MODE_DEFAULT,
Loader_mode::EN_LOADER_MODE_ENABLE,
Loader_mode::EN_LOADER_MODE_DISABLE,
];
}

impl ::protobuf::EnumFull for Loader_mode {
fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().enum_by_package_relative_name("loader_mode").unwrap()).clone()
}

fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
let index = *self as usize;
Self::enum_descriptor().value_by_index(index)
}
}

impl ::std::default::Default for Loader_mode {
fn default() -> Self {
Loader_mode::EN_LOADER_MODE_DEFAULT
}
}

impl Loader_mode {
fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
::protobuf::reflect::GeneratedEnumDescriptorData::new::<Loader_mode>("loader_mode")
}
}

/// Extension fields
pub mod exts {
Expand All @@ -37,17 +95,27 @@ pub mod exts {
pub const helper: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(1101, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);

pub const not_data_table: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(1102, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);

pub const default_loader: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, ::protobuf::EnumOrUnknown<super::Loader_mode>> = ::protobuf::ext::ExtFieldOptional::new(1103, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_ENUM);

pub const include_header: ::protobuf::ext::ExtFieldRepeated<::protobuf::descriptor::MessageOptions, ::std::string::String> = ::protobuf::ext::ExtFieldRepeated::new(1104, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
}

static file_descriptor_proto_data: &'static [u8] = b"\
\n\x13xresloader_ue.proto\x12\x11org.xresloader.ue\x1a\x20google/protobu\
f/descriptor.proto:7\n\x07key_tag\x18\xcd\x08\x20\x01(\x03\x12\x1d.googl\
e.protobuf.FieldOptionsR\x06keyTag:@\n\x0cue_type_name\x18\xce\x08\x20\
\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\nueTypeName:G\n\x10ue_type\
_is_class\x18\xcf\x08\x20\x01(\x08\x12\x1d.google.protobuf.FieldOptionsR\
\rueTypeIsClass:8\n\x06helper\x18\xcd\x08\x20\x01(\t\x12\x1f.google.prot\
obuf.MessageOptionsR\x06helper:F\n\x0enot_data_table\x18\xce\x08\x20\x01\
(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0cnotDataTableb\x06proto3\
f/descriptor.proto*`\n\x0bloader_mode\x12\x1a\n\x16EN_LOADER_MODE_DEFAUL\
T\x10\0\x12\x19\n\x15EN_LOADER_MODE_ENABLE\x10\x01\x12\x1a\n\x16EN_LOADE\
R_MODE_DISABLE\x10\x02:7\n\x07key_tag\x18\xcd\x08\x20\x01(\x03\x12\x1d.g\
oogle.protobuf.FieldOptionsR\x06keyTag:@\n\x0cue_type_name\x18\xce\x08\
\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\nueTypeName:G\n\x10ue_\
type_is_class\x18\xcf\x08\x20\x01(\x08\x12\x1d.google.protobuf.FieldOpti\
onsR\rueTypeIsClass:8\n\x06helper\x18\xcd\x08\x20\x01(\t\x12\x1f.google.\
protobuf.MessageOptionsR\x06helper:F\n\x0enot_data_table\x18\xce\x08\x20\
\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0cnotDataTable:g\n\
\x0edefault_loader\x18\xcf\x08\x20\x01(\x0e2\x1e.org.xresloader.ue.loade\
r_mode\x12\x1f.google.protobuf.MessageOptionsR\rdefaultLoader:G\n\x0einc\
lude_header\x18\xd0\x08\x20\x03(\t\x12\x1f.google.protobuf.MessageOption\
sR\rincludeHeaderb\x06proto3\
";

/// `FileDescriptorProto` object which was a source for this generated file
Expand All @@ -67,7 +135,8 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
let mut deps = ::std::vec::Vec::with_capacity(1);
deps.push(::protobuf::descriptor::file_descriptor().clone());
let mut messages = ::std::vec::Vec::with_capacity(0);
let mut enums = ::std::vec::Vec::with_capacity(0);
let mut enums = ::std::vec::Vec::with_capacity(1);
enums.push(Loader_mode::generated_enum_descriptor_data());
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
file_descriptor_proto(),
deps,
Expand Down
2 changes: 1 addition & 1 deletion third_party/xresloader-protocol

0 comments on commit 7643a69

Please sign in to comment.