Browse Source

Create lang dir

Armani Ferrante 4 years ago
parent
commit
f0297012c6

+ 4 - 27
Cargo.toml

@@ -1,33 +1,10 @@
-[package]
-name = "anchor-lang"
-version = "0.0.0-alpha.0"
-authors = ["Serum Foundation <foundation@projectserum.com>"]
-repository = "https://github.com/project-serum/anchor"
-edition = "2018"
-license = "Apache-2.0"
-description = "Solana Sealevel eDSL"
-
-[features]
-derive = []
-default = []
-
-[dependencies]
-anchor-attribute-access-control = { path = "./attribute/access-control", version = "0.0.0-alpha.0" }
-anchor-attribute-account = { path = "./attribute/account", version = "0.0.0-alpha.0" }
-anchor-attribute-error = { path = "./attribute/error" }
-anchor-attribute-program = { path = "./attribute/program", version = "0.0.0-alpha.0" }
-anchor-attribute-state = { path = "./attribute/state", version = "0.0.0-alpha.0" }
-anchor-derive-accounts = { path = "./derive/accounts", version = "0.0.0-alpha.0" }
-serum-borsh = { version = "0.8.0-serum.1", features = ["serum-program"] }
-solana-program = "=1.5.0"
-thiserror = "1.0.20"
-
 [workspace]
 members = [
     "cli",
     "client",
-    "syn",
-    "attribute/*",
-    "derive/*",
+    "lang",
+    "lang/attribute/*",
+    "lang/derive/*",
+    "lang/syn",
     "spl",
 ]

+ 2 - 2
cli/Cargo.toml

@@ -12,8 +12,8 @@ path = "src/main.rs"
 clap = "3.0.0-beta.1"
 anyhow = "1.0.32"
 syn = { version = "1.0.54", features = ["full", "extra-traits"] }
-anchor-lang = { path = "../" }
-anchor-syn = { path = "../syn", features = ["idl"] }
+anchor-lang = { path = "../lang" }
+anchor-syn = { path = "../lang/syn", features = ["idl"] }
 serde_json = "1.0"
 shellexpand = "2.1.0"
 serde_yaml = "0.8"

+ 1 - 1
client/Cargo.toml

@@ -5,7 +5,7 @@ authors = ["Armani Ferrante <armaniferrante@gmail.com>"]
 edition = "2018"
 
 [dependencies]
-anchor-lang = { path = "../" }
+anchor-lang = { path = "../lang" }
 solana-client = "1.5.0"
 solana-sdk = "1.5.0"
 thiserror = "1.0.20"

+ 23 - 0
lang/Cargo.toml

@@ -0,0 +1,23 @@
+[package]
+name = "anchor-lang"
+version = "0.0.0-alpha.0"
+authors = ["Serum Foundation <foundation@projectserum.com>"]
+repository = "https://github.com/project-serum/anchor"
+edition = "2018"
+license = "Apache-2.0"
+description = "Solana Sealevel eDSL"
+
+[features]
+derive = []
+default = []
+
+[dependencies]
+anchor-attribute-access-control = { path = "./attribute/access-control", version = "0.0.0-alpha.0" }
+anchor-attribute-account = { path = "./attribute/account", version = "0.0.0-alpha.0" }
+anchor-attribute-error = { path = "./attribute/error" }
+anchor-attribute-program = { path = "./attribute/program", version = "0.0.0-alpha.0" }
+anchor-attribute-state = { path = "./attribute/state", version = "0.0.0-alpha.0" }
+anchor-derive-accounts = { path = "./derive/accounts", version = "0.0.0-alpha.0" }
+serum-borsh = { version = "0.8.0-serum.1", features = ["serum-program"] }
+solana-program = "=1.5.0"
+thiserror = "1.0.20"

+ 0 - 0
attribute/access-control/Cargo.toml → lang/attribute/access-control/Cargo.toml


+ 0 - 0
attribute/access-control/src/lib.rs → lang/attribute/access-control/src/lib.rs


+ 0 - 0
attribute/account/Cargo.toml → lang/attribute/account/Cargo.toml


+ 0 - 0
attribute/account/src/lib.rs → lang/attribute/account/src/lib.rs


+ 0 - 0
attribute/error/Cargo.toml → lang/attribute/error/Cargo.toml


+ 0 - 0
attribute/error/src/lib.rs → lang/attribute/error/src/lib.rs


+ 0 - 0
attribute/program/Cargo.toml → lang/attribute/program/Cargo.toml


+ 0 - 0
attribute/program/src/lib.rs → lang/attribute/program/src/lib.rs


+ 0 - 0
attribute/state/Cargo.toml → lang/attribute/state/Cargo.toml


+ 0 - 0
attribute/state/src/lib.rs → lang/attribute/state/src/lib.rs


+ 0 - 0
derive/accounts/Cargo.toml → lang/derive/accounts/Cargo.toml


+ 0 - 0
derive/accounts/src/lib.rs → lang/derive/accounts/src/lib.rs


+ 0 - 0
src/account_info.rs → lang/src/account_info.rs


+ 0 - 0
src/boxed.rs → lang/src/boxed.rs


+ 0 - 0
src/context.rs → lang/src/context.rs


+ 0 - 0
src/cpi_account.rs → lang/src/cpi_account.rs


+ 0 - 0
src/ctor.rs → lang/src/ctor.rs


+ 0 - 0
src/error.rs → lang/src/error.rs


+ 0 - 0
src/idl.rs → lang/src/idl.rs


+ 0 - 0
src/lib.rs → lang/src/lib.rs


+ 0 - 0
src/program_account.rs → lang/src/program_account.rs


+ 0 - 0
src/state.rs → lang/src/state.rs


+ 0 - 0
src/sysvar.rs → lang/src/sysvar.rs


+ 0 - 0
syn/Cargo.toml → lang/syn/Cargo.toml


+ 0 - 1
syn/src/codegen/accounts.rs → lang/syn/src/codegen/accounts.rs

@@ -230,7 +230,6 @@ pub fn generate(accs: AccountsStruct) -> proc_macro2::TokenStream {
     };
 
     quote! {
-
         mod #account_mod_name {
             use super::*;
             use anchor_lang::prelude::borsh;

+ 0 - 0
syn/src/codegen/error.rs → lang/syn/src/codegen/error.rs


+ 0 - 0
syn/src/codegen/mod.rs → lang/syn/src/codegen/mod.rs


+ 0 - 0
syn/src/codegen/program.rs → lang/syn/src/codegen/program.rs


+ 0 - 0
syn/src/idl.rs → lang/syn/src/idl.rs


+ 0 - 0
syn/src/lib.rs → lang/syn/src/lib.rs


+ 0 - 0
syn/src/parser/accounts.rs → lang/syn/src/parser/accounts.rs


+ 0 - 0
syn/src/parser/error.rs → lang/syn/src/parser/error.rs


+ 0 - 0
syn/src/parser/file.rs → lang/syn/src/parser/file.rs


+ 0 - 0
syn/src/parser/mod.rs → lang/syn/src/parser/mod.rs


+ 0 - 0
syn/src/parser/program.rs → lang/syn/src/parser/program.rs


+ 1 - 1
spl/Cargo.toml

@@ -5,5 +5,5 @@ authors = ["Armani Ferrante <armaniferrante@gmail.com>"]
 edition = "2018"
 
 [dependencies]
-anchor-lang = { path = "../", features = ["derive"] }
+anchor-lang = { path = "../lang", features = ["derive"] }
 spl-token = { version = "3.0.1", features = ["no-entrypoint"] }