Skip to content

Commit

Permalink
Switch Borsh schema from JSON to Borsh format (#57)
Browse files Browse the repository at this point in the history
* Switch schema from string to Borsh format

* Add a way to generate schema of the schema

* Add schema helpers

* Add comments and fix dead_code.
  • Loading branch information
MaksymZavershynskyi authored Mar 6, 2020
1 parent 52f7605 commit 26b8223
Show file tree
Hide file tree
Showing 16 changed files with 738 additions and 515 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@
package-lock.json
yarn.lock

# Borsh schema file
**/schema_schema.dat

30 changes: 15 additions & 15 deletions borsh-rs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion borsh-rs/borsh-derive-internal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "borsh-derive-internal"
version = "0.3.0"
version = "0.4.0"
authors = ["Near Inc <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
Expand Down
6 changes: 3 additions & 3 deletions borsh-rs/borsh-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "borsh-derive"
version = "0.3.0"
version = "0.4.0"
authors = ["Near Inc <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
Expand All @@ -16,7 +16,7 @@ Binary Object Representation Serializer for Hashing
proc-macro = true

[dependencies]
borsh-derive-internal = { path = "../borsh-derive-internal" , version="0.3.0"}
borsh-schema-derive-internal = { path = "../borsh-schema-derive-internal" , version="0.3.0"}
borsh-derive-internal = { path = "../borsh-derive-internal" , version="0.4.0"}
borsh-schema-derive-internal = { path = "../borsh-schema-derive-internal" , version="0.4.0"}
syn = {version = "1", features = ["full", "fold"] }

2 changes: 1 addition & 1 deletion borsh-rs/borsh-schema-derive-internal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "borsh-schema-derive-internal"
version = "0.3.0"
version = "0.4.0"
authors = ["Near Inc <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
Expand Down
Loading

0 comments on commit 26b8223

Please sign in to comment.