forked from wormhole-foundation/wormhole
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: I2f0cc982c880ba1830ad1e1c4a4a409876c4ad66
- Loading branch information
Showing
10 changed files
with
4,305 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[package] | ||
name = "wormhole-messenger-common" | ||
version = "0.1.0" | ||
edition = "2018" | ||
|
||
[lib] | ||
name = "messenger_common" | ||
crate-type = ["cdylib", "lib"] | ||
|
||
[dependencies] | ||
borsh = "0.8.1" | ||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use borsh::{ | ||
BorshDeserialize, | ||
BorshSerialize, | ||
}; | ||
|
||
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, PartialEq)] | ||
pub struct Message { | ||
/// Messenger/DM username. | ||
pub nick: String, | ||
|
||
/// Message text to be output on the target networks node logs. | ||
pub text: String, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Uses 2018 for maximum compatibiilty with Solana. | ||
edition = "2018" | ||
|
||
# Merge similar crates together to avoid multiple use statements. | ||
imports_granularity = "Module" | ||
|
||
# Consistency in formatting makes tool based searching/editing better. | ||
empty_item_single_line = false | ||
|
||
# Easier editing when arbitrary mixed use statements do not collapse. | ||
imports_layout = "Vertical" | ||
|
||
# Default rustfmt formatting of match arms with branches is awful. | ||
match_arm_leading_pipes = "Preserve" | ||
|
||
# Align Fields | ||
enum_discrim_align_threshold = 80 | ||
struct_field_align_threshold = 80 | ||
|
||
# Allow up to two blank lines for grouping. | ||
blank_lines_upper_bound = 2 |
Oops, something went wrong.