Skip to content

Commit

Permalink
feat(zinkup): move zinkup to the top level
Browse files Browse the repository at this point in the history
  • Loading branch information
clearloop committed Oct 25, 2023
1 parent 3e9c3cb commit b55e97d
Show file tree
Hide file tree
Showing 17 changed files with 99 additions and 98 deletions.
28 changes: 19 additions & 9 deletions Cargo.lock

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

57 changes: 47 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,61 @@
[workspace.package]
version = "0.1.4"
authors = ["clearloop"]
edition = "2021"
license = "GPL-3.0-only"
homepage = "https://github.com/clearloop/zink"
repository = "https://github.com/clearloop/zink.git"
[package]
name = "zinkup"
description = "Zink toolchain"
documentation = "https://docs.rs/zinkup"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[[bin]]
name = "zinkc"
required-features = [ "zinkc" ]

[[bin]]
name = "elko"
required-features = [ "elko" ]

[dependencies]
anyhow.workspace = true
clap = { workspace = true, features = [ "derive" ] }
color-eyre.workspace = true
tracing-subscriber = { workspace = true, features = [ "env-filter" ] }

elko = { workspace = true, optional = true }
zinkc = { workspace = true, optional = true }

[features]
default = [ "elko", "zinkc" ]
elko = [ "dep:elko" ]
zinkc = [ "dep:zinkc" ]

# Workspace manifest
# ------------------

[workspace]
members = [
"cli",
"codegen",
"codegen/abi",
"codegen/opcodes",
"compiler",
"utils/*",
"utils/conta",
"utils/elko",
"zink",
"zink/codegen",
"zint"
]
resolver = "2"

[workspace.package]
version = "0.1.4"
authors = ["clearloop"]
edition = "2021"
license = "GPL-3.0-only"
homepage = "https://github.com/clearloop/zink"
repository = "https://github.com/clearloop/zink.git"

[workspace.dependencies]
anyhow = "1.0.71"
cargo_metadata = "0.15.4"
Expand Down Expand Up @@ -53,9 +89,10 @@ wasmparser = "0.107.0"
wat = "1.0.75"

# Local Dependencies.
elko = { path = "utils/elko", version = "=0.1.4" }
opcodes = { package = "evm-opcodes", path = "codegen/opcodes", version = "=0.0.3", features = ["data"] }
zabi = { path = "codegen/abi", version = "=0.1.4" }
zinkup = { path = "cli", version = "=0.1.4" }
opcodes = { package = "evm-opcodes", path = "codegen/opcodes", version = "=0.0.3", features = ["data"] }
zingen = { path = "codegen", version = "=0.1.4" }
zinkc = { path = "compiler", version = "=0.1.4" }
zink = { path = "zink", version = "=0.1.4" }
Expand Down
1 change: 1 addition & 0 deletions Conta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ packages = [
"zinkc",
"zink-codegen",
"zink",
"elko",
"zinkup"
]
41 changes: 0 additions & 41 deletions cli/Cargo.toml

This file was deleted.

25 changes: 0 additions & 25 deletions cli/README.md

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 3 additions & 9 deletions cli/src/lib.rs → src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
//! Zink command line tool
#![deny(missing_docs)]
//! Zink toolchain.
use anyhow::Error;
use clap::Parser;
use color_eyre::{eyre::eyre, Result};
pub use commands::*;
use tracing_subscriber::filter::EnvFilter;

mod build;
mod compile;
mod new;
pub mod utils;

mod commands {
#[cfg(feature = "elko")]
pub use crate::{build::Build, new::New};

#[cfg(feature = "zinkc")]
pub use crate::compile::Compile;
#[cfg(feature = "elko")]
pub use elko::{Build, New};
}

/// Shared application interface.
Expand Down
22 changes: 22 additions & 0 deletions utils/elko/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "elko"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
anyhow.workspace = true
clap = { workspace = true, features = [ "derive" ] }
cargo_metadata.workspace = true
colored.workspace = true
etc.workspace = true
semver.workspace = true
serde = { workspace = true, features = [ "derive" ] }
thiserror.workspace = true
toml.workspace = true
tracing.workspace = true
wasm-opt.workspace = true
zinkc.workspace = true
1 change: 0 additions & 1 deletion cli/src/build.rs → utils/elko/src/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//! Command `Build`.
#![cfg(feature = "elko")]
use crate::utils::{Profile, WasmBuilder};
use anyhow::{anyhow, Result};
use clap::Parser;
Expand Down
7 changes: 7 additions & 0 deletions utils/elko/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//! Zink package manager.
mod build;
mod new;
pub mod utils;

pub use self::{build::Build, new::New};
2 changes: 0 additions & 2 deletions cli/src/new.rs → utils/elko/src/new.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//! Command `New`
#![cfg(feature = "elko")]

use crate::utils::Manifest;
use anyhow::{anyhow, Result};
use clap::Parser;
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion cli/src/utils/mod.rs → utils/elko/src/utils/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//! CLI Utils
#![cfg(feature = "elko")]
pub use self::{
manifest::Manifest,
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit b55e97d

Please sign in to comment.