Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: rename zkevm-llvm to zksync-llvm #27

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/actions/build_and_test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ runs:
check_name: ${{ matrix.name }} Test Results
files: ${{ env.UNIT_TESTS_RESULTS_XML }}
action_fail_on_inconclusive: true
comment_mode: off

- name: Upload test results (MacOS)
if: runner.os == 'macos'
Expand All @@ -28,6 +29,7 @@ runs:
check_name: ${{ matrix.name }} Test Results
files: ${{ env.UNIT_TESTS_RESULTS_XML }}
action_fail_on_inconclusive: true
comment_mode: off

- name: Upload test results (windows)
if: runner.os == 'Windows'
Expand All @@ -36,3 +38,4 @@ runs:
check_name: ${{ matrix.name }} Test Results
files: ${{ env.UNIT_TESTS_RESULTS_XML }}
action_fail_on_inconclusive: true
comment_mode: off
2 changes: 1 addition & 1 deletion Cargo.lock

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

9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
[package]
name = "compiler-llvm-builder"
version = "1.0.24"
version = "1.0.25"
authors = [
"Oleksandr Zarudnyi <[email protected]>",
"Anton Baliasnikov <[email protected]>",
]
license = "MIT OR Apache-2.0"
edition = "2021"
description = "EraVM LLVM Framework Builder"
description = "ZKsync LLVM Framework Builder"
repository = "https://github.com/matter-labs/era-compiler-llvm-builder"

[[bin]]
name = "zkevm-llvm"
path = "src/zkevm_llvm/main.rs"
name = "zksync-llvm"
path = "src/zksync_llvm/main.rs"

[lib]
doctest = false
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# zkSync Era: LLVM Framework Builder
# ZKsync Era: LLVM Framework Builder

<p align="center"><a href="https://zksync.io" target="_blank"><img alt="zkSync Era zkEVM is Ethereum’s most user-centric ZK-rollup" title="zkSync Era zkEVM is Ethereum’s most user-centric ZK-rollup" src="https://raw.githubusercontent.com/matter-labs/.github/main/header-image.png" width="100%">
<p align="center"><a href="https://zksync.io" target="_blank"><img alt="ZKsync Era is Ethereum’s most user-centric ZK-rollup" title="ZKsync Era is Ethereum’s most user-centric ZK-rollup" src="https://raw.githubusercontent.com/matter-labs/.github/main/header-image.png" width="100%">
</a>
</p>

zkSync Era is a layer 2 rollup that uses zero-knowledge proofs to scale Ethereum without compromising on security
ZKsync Era is a layer 2 rollup that uses zero-knowledge proofs to scale Ethereum without compromising on security
or decentralization. As it's EVM-compatible (with Solidity/Vyper), 99% of Ethereum projects can redeploy without
needing to refactor or re-audit any code. zkSync Era also uses an LLVM-based compiler that will eventually enable
developers to write smart contracts in popular languages such as C++ and Rust.

This repository contains the builder of the EraVM fork of the LLVM framework.
This repository contains the builder of the ZKsync fork of the LLVM framework.

## License

Expand All @@ -30,7 +30,7 @@ at your option.

## Disclaimer

zkSync Era has been through extensive testing and audits, and although it is live, it is still in alpha state and
ZKsync Era has been through extensive testing and audits, and although it is live, it is still in alpha state and
will undergo further audits and bug bounty programs. We would love to hear our community's thoughts and suggestions
about it!
It's important to note that forking it now could potentially lead to missing important
Expand Down
4 changes: 2 additions & 2 deletions src/build_type.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//!
//! The zkEVM LLVM build type.
//! The ZKsync LLVM build type.
//!

///
/// The zkEVM LLVM build type.
/// The ZKsync LLVM build type.
///
#[derive(Debug, PartialEq, Eq)]
pub enum BuildType {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//!
//! The zkEVM LLVM builder library.
//! The ZKsync LLVM builder library.
//!

pub mod build_type;
Expand Down
2 changes: 1 addition & 1 deletion src/llvm_path.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//!
//! The zkEVM LLVM builder constants.
//! The ZKsync LLVM builder constants.
//!

use std::path::PathBuf;
Expand Down
2 changes: 1 addition & 1 deletion src/lock.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//!
//! The zkEVM LLVM builder lock file.
//! The ZKsync LLVM builder lock file.
//!

use anyhow::Context;
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/aarch64_linux_gnu.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//!
//! The zkEVM LLVM arm64 `linux-gnu` builder.
//! The ZKsync LLVM arm64 `linux-gnu` builder.
//!

use std::collections::HashSet;
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/aarch64_linux_musl.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//!
//! The zkEVM LLVM arm64 `linux-musl` builder.
//! The ZKsync LLVM arm64 `linux-musl` builder.
//!

use std::collections::HashSet;
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/aarch64_macos.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//!
//! The zkEVM LLVM arm64 `macos-aarch64` builder.
//! The ZKsync LLVM arm64 `macos-aarch64` builder.
//!

use std::collections::HashSet;
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//!
//! The zkEVM LLVM builder platforms.
//! The ZKsync LLVM builder platforms.
//!

pub mod aarch64_linux_gnu;
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/x86_64_linux_gnu.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//!
//! The zkEVM LLVM amd64 `linux-gnu` builder.
//! The ZKsync LLVM amd64 `linux-gnu` builder.
//!

use std::collections::HashSet;
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/x86_64_linux_musl.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//!
//! The zkEVM LLVM amd64 `linux-musl` builder.
//! The ZKsync LLVM amd64 `linux-musl` builder.
//!

use std::collections::HashSet;
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/x86_64_macos.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//!
//! The zkEVM LLVM amd64 `macos` builder.
//! The ZKsync LLVM amd64 `macos` builder.
//!

use std::collections::HashSet;
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/x86_64_windows_gnu.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//!
//! The zkEVM LLVM amd64 `windows-gnu` builder.
//! The ZKsync LLVM amd64 `windows-gnu` builder.
//!

use std::collections::HashSet;
Expand Down
6 changes: 3 additions & 3 deletions src/zkevm_llvm/arguments.rs → src/zksync_llvm/arguments.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
//!
//! The zkEVM LLVM builder arguments.
//! The ZKsync LLVM builder arguments.
//!

use structopt::StructOpt;

///
/// The zkEVM LLVM builder arguments.
/// The ZKsync LLVM builder arguments.
///
#[derive(Debug, StructOpt)]
#[structopt(name = "llvm-builder", about = "The zkEVM LLVM framework builder")]
#[structopt(name = "llvm-builder", about = "The ZKsync LLVM framework builder")]
pub enum Arguments {
/// Clone the branch specified in `LLVM.lock`.
Clone {
Expand Down
2 changes: 1 addition & 1 deletion src/zkevm_llvm/main.rs → src/zksync_llvm/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//!
//! The zkEVM LLVM builder.
//! The ZKsync LLVM builder.
//!

pub(crate) mod arguments;
Expand Down
24 changes: 12 additions & 12 deletions tests/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use rstest::rstest;
/// Returns `Ok(())` if the test passes.
#[rstest]
fn build_without_clone() -> anyhow::Result<()> {
let mut cmd = Command::cargo_bin(common::ZKEVM_LLVM)?;
let mut cmd = Command::cargo_bin(common::ZKSYNC_LLVM)?;
let file = assert_fs::NamedTempFile::new(common::LLVM_LOCK_FILE)?;
let path = file.parent().expect("Lockfile parent dir does not exist");
cmd.current_dir(path);
Expand All @@ -48,8 +48,8 @@ fn build_without_clone() -> anyhow::Result<()> {
#[rstest]
#[timeout(std::time::Duration::from_secs(5000))]
fn clone_build_and_clean() -> anyhow::Result<()> {
let mut cmd = Command::cargo_bin(common::ZKEVM_LLVM)?;
let lockfile = common::create_test_tmp_lockfile(common::ERA_LLVM_REPO_TEST_REF)?;
let mut cmd = Command::cargo_bin(common::ZKSYNC_LLVM)?;
let lockfile = common::create_test_tmp_lockfile(None)?;
let test_dir = lockfile
.parent()
.expect("Lockfile parent dir does not exist");
Expand All @@ -58,14 +58,14 @@ fn clone_build_and_clean() -> anyhow::Result<()> {
cmd.assert()
.success()
.stderr(predicate::str::is_match(".*Updating files:.*100%.*done").unwrap());
let mut build_cmd = Command::cargo_bin(common::ZKEVM_LLVM)?;
let mut build_cmd = Command::cargo_bin(common::ZKSYNC_LLVM)?;
build_cmd.current_dir(test_dir);
build_cmd
.arg("build")
.assert()
.success()
.stdout(predicate::str::is_match("Installing:.*").unwrap());
let mut clean_cmd = Command::cargo_bin(common::ZKEVM_LLVM)?;
let mut clean_cmd = Command::cargo_bin(common::ZKSYNC_LLVM)?;
clean_cmd.current_dir(test_dir);
clean_cmd.arg("clean");
clean_cmd.assert().success();
Expand All @@ -88,8 +88,8 @@ fn clone_build_and_clean() -> anyhow::Result<()> {
#[rstest]
#[timeout(std::time::Duration::from_secs(5000))]
fn clone_build_and_clean_musl() -> anyhow::Result<()> {
let mut cmd = Command::cargo_bin(common::ZKEVM_LLVM)?;
let lockfile = common::create_test_tmp_lockfile(common::ERA_LLVM_REPO_TEST_REF)?;
let mut cmd = Command::cargo_bin(common::ZKSYNC_LLVM)?;
let lockfile = common::create_test_tmp_lockfile(None)?;
let test_dir = lockfile
.parent()
.expect("Lockfile parent dir does not exist");
Expand All @@ -98,7 +98,7 @@ fn clone_build_and_clean_musl() -> anyhow::Result<()> {
cmd.assert()
.success()
.stderr(predicate::str::is_match(".*Updating files:.*100%.*done").unwrap());
let mut build_cmd = Command::cargo_bin(common::ZKEVM_LLVM)?;
let mut build_cmd = Command::cargo_bin(common::ZKSYNC_LLVM)?;
build_cmd.current_dir(test_dir);
build_cmd
.arg("build")
Expand All @@ -107,7 +107,7 @@ fn clone_build_and_clean_musl() -> anyhow::Result<()> {
.assert()
.success()
.stdout(predicate::str::is_match("Installing:.*").unwrap());
let mut clean_cmd = Command::cargo_bin(common::ZKEVM_LLVM)?;
let mut clean_cmd = Command::cargo_bin(common::ZKSYNC_LLVM)?;
clean_cmd.current_dir(test_dir);
clean_cmd.arg("clean");
clean_cmd.assert().success();
Expand All @@ -130,8 +130,8 @@ fn clone_build_and_clean_musl() -> anyhow::Result<()> {
#[rstest]
#[timeout(std::time::Duration::from_secs(5000))]
fn debug_build_with_tests_coverage() -> anyhow::Result<()> {
let mut cmd = Command::cargo_bin(common::ZKEVM_LLVM)?;
let lockfile = common::create_test_tmp_lockfile(common::ERA_LLVM_REPO_TEST_REF)?;
let mut cmd = Command::cargo_bin(common::ZKSYNC_LLVM)?;
let lockfile = common::create_test_tmp_lockfile(None)?;
let test_dir = lockfile
.parent()
.expect("Lockfile parent dir does not exist");
Expand All @@ -140,7 +140,7 @@ fn debug_build_with_tests_coverage() -> anyhow::Result<()> {
cmd.assert()
.success()
.stderr(predicate::str::is_match(".*Updating files:.*100%.*done").unwrap());
let mut build_cmd = Command::cargo_bin(common::ZKEVM_LLVM)?;
let mut build_cmd = Command::cargo_bin(common::ZKSYNC_LLVM)?;
build_cmd.current_dir(test_dir);
build_cmd
.arg("build")
Expand Down
30 changes: 9 additions & 21 deletions tests/checkout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ use rstest::rstest;
/// Returns `Ok(())` if the test passes.
#[rstest]
fn checkout_after_clone() -> anyhow::Result<()> {
let mut cmd = Command::cargo_bin(common::ZKEVM_LLVM)?;
let lockfile = common::create_test_tmp_lockfile(common::ERA_LLVM_REPO_TEST_REF)?;
let mut cmd = Command::cargo_bin(common::ZKSYNC_LLVM)?;
let lockfile = common::create_test_tmp_lockfile(None)?;
let test_dir = lockfile
.parent()
.expect("Lockfile parent dir does not exist");
Expand All @@ -31,16 +31,10 @@ fn checkout_after_clone() -> anyhow::Result<()> {
cmd.assert()
.success()
.stderr(predicate::str::is_match(".*Updating files:.*100%.*done").unwrap());
let mut checkout_cmd = Command::cargo_bin(common::ZKEVM_LLVM)?;
let mut checkout_cmd = Command::cargo_bin(common::ZKSYNC_LLVM)?;
checkout_cmd.current_dir(test_dir);
checkout_cmd.arg("checkout");
checkout_cmd
.assert()
.success()
.stderr(predicate::str::contains(format!(
"HEAD is now at {}",
&common::ERA_LLVM_REPO_TEST_REF[..8]
)));
checkout_cmd.assert().success();
Ok(())
}

Expand All @@ -59,8 +53,8 @@ fn checkout_after_clone() -> anyhow::Result<()> {
/// Returns `Ok(())` if the test passes.
#[rstest]
fn force_checkout() -> anyhow::Result<()> {
let mut cmd = Command::cargo_bin(common::ZKEVM_LLVM)?;
let lockfile = common::create_test_tmp_lockfile(common::ERA_LLVM_REPO_TEST_REF)?;
let mut cmd = Command::cargo_bin(common::ZKSYNC_LLVM)?;
let lockfile = common::create_test_tmp_lockfile(None)?;
let test_dir = lockfile
.parent()
.expect("Lockfile parent dir does not exist");
Expand All @@ -69,16 +63,10 @@ fn force_checkout() -> anyhow::Result<()> {
cmd.assert()
.success()
.stderr(predicate::str::is_match(".*Updating files:.*100%.*done").unwrap());
let mut checkout_cmd = Command::cargo_bin(common::ZKEVM_LLVM)?;
let mut checkout_cmd = Command::cargo_bin(common::ZKSYNC_LLVM)?;
checkout_cmd.current_dir(test_dir);
checkout_cmd.arg("checkout").arg("--force");
checkout_cmd
.assert()
.success()
.stderr(predicate::str::contains(format!(
"HEAD is now at {}",
&common::ERA_LLVM_REPO_TEST_REF[..8]
)));
checkout_cmd.assert().success();
Ok(())
}

Expand All @@ -97,7 +85,7 @@ fn force_checkout() -> anyhow::Result<()> {
/// Returns `Ok(())` if the test passes.
#[rstest]
fn checkout_without_lockfile() -> anyhow::Result<()> {
let mut cmd = Command::cargo_bin(common::ZKEVM_LLVM)?;
let mut cmd = Command::cargo_bin(common::ZKSYNC_LLVM)?;
let file = assert_fs::NamedTempFile::new(common::LLVM_LOCK_FILE)?;
let path = file.parent().expect("Lockfile parent dir does not exist");
cmd.current_dir(path);
Expand Down
2 changes: 1 addition & 1 deletion tests/clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use rstest::rstest;
/// Returns `Ok(())` if the test passes.
#[rstest]
fn clean_without_clone() -> anyhow::Result<()> {
let mut cmd = Command::cargo_bin(common::ZKEVM_LLVM)?;
let mut cmd = Command::cargo_bin(common::ZKSYNC_LLVM)?;
let file = assert_fs::NamedTempFile::new(common::LLVM_LOCK_FILE)?;
let path = file.parent().expect("Lockfile parent dir does not exist");
cmd.current_dir(path);
Expand Down
Loading
Loading