Skip to content

Commit

Permalink
v0.4.4 (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
armaniferrante authored Apr 19, 2021
1 parent ab509b6 commit 0de345f
Show file tree
Hide file tree
Showing 17 changed files with 69 additions and 51 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ incremented for features.

## [Unreleased]

## [0.4.4] - 2021-04-18

## Features

* lang: Allows one to specify multiple `with` targets when creating associated acconts ([#197](https://github.com/project-serum/anchor/pull/197)).
* lang, ts: Add array support ([#202](https://github.com/project-serum/anchor/pull/202)).
* lang: Zero copy deserialization for accounts ([#202](https://github.com/project-serum/anchor/pull/202)).
* lang: Zero copy deserialization for accounts ([#202](https://github.com/project-serum/anchor/pull/202), [#206](https://github.com/project-serum/anchor/pull/206)).
* lang, spl, cli, client: Upgrade solana toolchain to 1.6.6 ([#210](https://github.com/project-serum/anchor/pull/210)).

## [0.4.3] - 2021-04-13

Expand Down
26 changes: 13 additions & 13 deletions 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 cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "anchor-cli"
version = "0.4.3"
version = "0.4.4"
authors = ["armaniferrante <armaniferrante@gmail.com>"]
edition = "2018"

Expand Down
4 changes: 2 additions & 2 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "anchor-client"
version = "0.4.3"
version = "0.4.4"
authors = ["Serum Foundation <foundation@projectserum.com>"]
edition = "2018"
license = "Apache-2.0"
description = "Rust client for Anchor programs"

[dependencies]
anchor-lang = { path = "../lang", version = "0.4.3" }
anchor-lang = { path = "../lang", version = "0.4.4" }
anyhow = "1.0.32"
regex = "1.4.5"
solana-client = "1.6.6"
Expand Down
18 changes: 9 additions & 9 deletions lang/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "anchor-lang"
version = "0.4.3"
version = "0.4.4"
authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
edition = "2018"
Expand All @@ -12,14 +12,14 @@ derive = []
default = []

[dependencies]
anchor-attribute-access-control = { path = "./attribute/access-control", version = "0.4.3" }
anchor-attribute-account = { path = "./attribute/account", version = "0.4.3" }
anchor-attribute-error = { path = "./attribute/error", version = "0.4.3" }
anchor-attribute-program = { path = "./attribute/program", version = "0.4.3" }
anchor-attribute-state = { path = "./attribute/state", version = "0.4.3" }
anchor-attribute-interface = { path = "./attribute/interface", version = "0.4.3" }
anchor-attribute-event = { path = "./attribute/event", version = "0.4.3" }
anchor-derive-accounts = { path = "./derive/accounts", version = "0.4.3" }
anchor-attribute-access-control = { path = "./attribute/access-control", version = "0.4.4" }
anchor-attribute-account = { path = "./attribute/account", version = "0.4.4" }
anchor-attribute-error = { path = "./attribute/error", version = "0.4.4" }
anchor-attribute-program = { path = "./attribute/program", version = "0.4.4" }
anchor-attribute-state = { path = "./attribute/state", version = "0.4.4" }
anchor-attribute-interface = { path = "./attribute/interface", version = "0.4.4" }
anchor-attribute-event = { path = "./attribute/event", version = "0.4.4" }
anchor-derive-accounts = { path = "./derive/accounts", version = "0.4.4" }
base64 = "0.13.0"
borsh = "0.8.2"
bytemuck = "1.4.0"
Expand Down
4 changes: 2 additions & 2 deletions lang/attribute/access-control/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "anchor-attribute-access-control"
version = "0.4.3"
version = "0.4.4"
authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
Expand All @@ -15,5 +15,5 @@ proc-macro2 = "1.0"
quote = "1.0"
syn = { version = "1.0.60", features = ["full"] }
anyhow = "1.0.32"
anchor-syn = { path = "../../syn", version = "0.4.3" }
anchor-syn = { path = "../../syn", version = "0.4.4" }
regex = "1.0"
4 changes: 2 additions & 2 deletions lang/attribute/account/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "anchor-attribute-account"
version = "0.4.3"
version = "0.4.4"
authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
Expand All @@ -15,4 +15,4 @@ proc-macro2 = "1.0"
quote = "1.0"
syn = { version = "1.0.60", features = ["full"] }
anyhow = "1.0.32"
anchor-syn = { path = "../../syn", version = "0.4.3", features = ["hash"] }
anchor-syn = { path = "../../syn", version = "0.4.4", features = ["hash"] }
25 changes: 20 additions & 5 deletions lang/attribute/account/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ use syn::parse_macro_input;
///
/// # Zero Copy Deserialization
///
/// **WARNING**: Zero copy deserialization is an experimental feature. It's
/// recommended to use it only when necessary, i.e., when you have extremely
/// large accounts that cannot be Borsh deserialized without hitting stack or
/// heap limits.
///
/// ## Usage
///
/// To enable zero-copy-deserialization, one can pass in the `zero_copy`
/// argument to the macro as follows:
///
Expand All @@ -29,14 +36,22 @@ use syn::parse_macro_input;
///
/// This can be used to conveniently implement
/// [`ZeroCopy`](./trait.ZeroCopy.html) so that the account can be used
/// with [`AccountLoader`](./struct.AccountLoader.html).
/// with [`Loader`](./struct.Loader.html).
///
/// Other than being more efficient, the most salient benefit this provides is
/// the ability to define account types larger than the max stack or heap size.
/// This is used in special cases, for example, the Serum DEX event queue. When
/// using borsh, one is limited, since the account has to be copied and
/// deserialized into a new data structure. With zero copy deserialization,
/// everything is, effectively, lazy loaded on field access.
/// When using borsh, the account has to be copied and deserialized into a new
/// data structure and thus is constrained by stack and heap limits imposed by
/// the BPF VM. With zero copy deserialization, all bytes from the account's
/// backing `RefCell<&mut [u8]>` are simply re-interpreted as a reference to
/// the data structure. No allocations or copies necessary. Hence the ability
/// to get around stack and heap limitations.
///
/// To facilitate this, all fields in an account must be constrained to be
/// "plain old data", i.e., they must implement
/// [`Pod`](../bytemuck/trait.Pod.html). Please review the
/// [`safety`](file:///home/armaniferrante/Documents/code/src/github.com/project-serum/anchor/target/doc/bytemuck/trait.Pod.html#safety)
/// section before using.
#[proc_macro_attribute]
pub fn account(
args: proc_macro::TokenStream,
Expand Down
4 changes: 2 additions & 2 deletions lang/attribute/error/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "anchor-attribute-error"
version = "0.4.3"
version = "0.4.4"
authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
Expand All @@ -14,4 +14,4 @@ proc-macro = true
proc-macro2 = "1.0"
quote = "1.0"
syn = { version = "1.0.60", features = ["full"] }
anchor-syn = { path = "../../syn", version = "0.4.3" }
anchor-syn = { path = "../../syn", version = "0.4.4" }
4 changes: 2 additions & 2 deletions lang/attribute/event/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "anchor-attribute-event"
version = "0.4.3"
version = "0.4.4"
authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
Expand All @@ -15,4 +15,4 @@ proc-macro2 = "1.0"
quote = "1.0"
syn = { version = "1.0.60", features = ["full"] }
anyhow = "1.0.32"
anchor-syn = { path = "../../syn", version = "0.4.3", features = ["hash"] }
anchor-syn = { path = "../../syn", version = "0.4.4", features = ["hash"] }
4 changes: 2 additions & 2 deletions lang/attribute/interface/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "anchor-attribute-interface"
version = "0.4.3"
version = "0.4.4"
authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
Expand All @@ -15,5 +15,5 @@ proc-macro2 = "1.0"
quote = "1.0"
syn = { version = "1.0.60", features = ["full"] }
anyhow = "1.0.32"
anchor-syn = { path = "../../syn", version = "0.4.3" }
anchor-syn = { path = "../../syn", version = "0.4.4" }
heck = "0.3.2"
4 changes: 2 additions & 2 deletions lang/attribute/program/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "anchor-attribute-program"
version = "0.4.3"
version = "0.4.4"
authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
Expand All @@ -15,4 +15,4 @@ proc-macro2 = "1.0"
quote = "1.0"
syn = { version = "1.0.60", features = ["full"] }
anyhow = "1.0.32"
anchor-syn = { path = "../../syn", version = "0.4.3" }
anchor-syn = { path = "../../syn", version = "0.4.4" }
4 changes: 2 additions & 2 deletions lang/attribute/state/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "anchor-attribute-state"
version = "0.4.3"
version = "0.4.4"
authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
Expand All @@ -15,4 +15,4 @@ proc-macro2 = "1.0"
quote = "1.0"
syn = { version = "1.0.60", features = ["full"] }
anyhow = "1.0.32"
anchor-syn = { path = "../../syn", version = "0.4.3" }
anchor-syn = { path = "../../syn", version = "0.4.4" }
4 changes: 2 additions & 2 deletions lang/derive/accounts/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "anchor-derive-accounts"
version = "0.4.3"
version = "0.4.4"
authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
Expand All @@ -15,4 +15,4 @@ proc-macro2 = "1.0"
quote = "1.0"
syn = { version = "1.0.60", features = ["full"] }
anyhow = "1.0.32"
anchor-syn = { path = "../../syn", version = "0.4.3" }
anchor-syn = { path = "../../syn", version = "0.4.4" }
2 changes: 1 addition & 1 deletion lang/syn/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "anchor-syn"
version = "0.4.3"
version = "0.4.4"
authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions spl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "anchor-spl"
version = "0.4.3"
version = "0.4.4"
authors = ["Serum Foundation <foundation@projectserum.com>"]
edition = "2018"
license = "Apache-2.0"
description = "CPI clients for SPL programs"

[dependencies]
anchor-lang = { path = "../lang", version = "0.4.3", features = ["derive"] }
anchor-lang = { path = "../lang", version = "0.4.4", features = ["derive"] }
spl-token = { version = "3.0.1", features = ["no-entrypoint"] }
solana-program = "1.6.6"
2 changes: 1 addition & 1 deletion ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@project-serum/anchor",
"version": "0.4.3",
"version": "0.4.4",
"description": "Anchor client",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
Expand Down

0 comments on commit 0de345f

Please sign in to comment.