From 01ed9fc6c8bef152da5b85d16f6d9d4c75a0aacf Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Fri, 29 Apr 2016 14:32:10 -0700 Subject: [PATCH] Rename libraries libctonfile -> libreader. This library will only provide .cton file reading/parsing services which are not needed after deployment. Code for writing .cton files lives in the main cretonne library because it is fairly small, and because it is useful for extracting test cases from a deployed library. --- cranelift/src/libcretonne/write.rs | 2 +- cranelift/src/{libctonfile => libreader}/Cargo.toml | 4 ++-- cranelift/src/{libctonfile => libreader}/lexer.rs | 0 cranelift/src/{libctonfile => libreader}/lib.rs | 4 ++-- cranelift/src/{libctonfile => libreader}/parser.rs | 0 cranelift/src/test-all.sh | 4 ++-- cranelift/src/tools/Cargo.lock | 4 ++-- cranelift/src/tools/Cargo.toml | 2 +- cranelift/src/tools/main.rs | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) rename cranelift/src/{libctonfile => libreader}/Cargo.toml (78%) rename cranelift/src/{libctonfile => libreader}/lexer.rs (100%) rename cranelift/src/{libctonfile => libreader}/lib.rs (82%) rename cranelift/src/{libctonfile => libreader}/parser.rs (100%) diff --git a/cranelift/src/libcretonne/write.rs b/cranelift/src/libcretonne/write.rs index 7281294fe6..f245d977c2 100644 --- a/cranelift/src/libcretonne/write.rs +++ b/cranelift/src/libcretonne/write.rs @@ -2,7 +2,7 @@ //! //! The `write` module provides the `write_function` function which converts an IL `Function` to an //! equivalent textual representation. This textual representation can be read back by the -//! `ctonfile` crate. +//! `cretonne-reader` crate. use std::io::{self, Write}; use repr::Function; diff --git a/cranelift/src/libctonfile/Cargo.toml b/cranelift/src/libreader/Cargo.toml similarity index 78% rename from cranelift/src/libctonfile/Cargo.toml rename to cranelift/src/libreader/Cargo.toml index 7b2826b072..478ee3b586 100644 --- a/cranelift/src/libctonfile/Cargo.toml +++ b/cranelift/src/libreader/Cargo.toml @@ -1,11 +1,11 @@ [package] authors = ["The Cretonne Project Developers"] -name = "ctonfile" +name = "cretonne-reader" version = "0.0.0" publish = false [lib] -name = "ctonfile" +name = "cton_reader" path = "lib.rs" [dependencies] diff --git a/cranelift/src/libctonfile/lexer.rs b/cranelift/src/libreader/lexer.rs similarity index 100% rename from cranelift/src/libctonfile/lexer.rs rename to cranelift/src/libreader/lexer.rs diff --git a/cranelift/src/libctonfile/lib.rs b/cranelift/src/libreader/lib.rs similarity index 82% rename from cranelift/src/libctonfile/lib.rs rename to cranelift/src/libreader/lib.rs index 9dcb169b7d..2d63e68264 100644 --- a/cranelift/src/libctonfile/lib.rs +++ b/cranelift/src/libreader/lib.rs @@ -1,11 +1,11 @@ // ====------------------------------------------------------------------------------------==== // // -// Cretonne file read/write library. +// Cretonne file reader library. // // ====------------------------------------------------------------------------------------==== // // -// The libctonfile library supports reading and writing .cton files. This functionality is needed +// The cton_reader library supports reading and writing .cton files. This functionality is needed // for testing Cretonne, but is not essential for a JIT compiler. // // ====------------------------------------------------------------------------------------==== // diff --git a/cranelift/src/libctonfile/parser.rs b/cranelift/src/libreader/parser.rs similarity index 100% rename from cranelift/src/libctonfile/parser.rs rename to cranelift/src/libreader/parser.rs diff --git a/cranelift/src/test-all.sh b/cranelift/src/test-all.sh index 6838b1544f..4fe15bdca2 100755 --- a/cranelift/src/test-all.sh +++ b/cranelift/src/test-all.sh @@ -1,4 +1,4 @@ #!/bin/bash cd $(dirname "$0")/tools -cargo test -p cretonne -p ctonfile -p cretonne-tools -cargo doc -p cretonne -p ctonfile -p cretonne-tools +cargo test -p cretonne -p cretonne-reader -p cretonne-tools +cargo doc -p cretonne -p cretonne-reader -p cretonne-tools diff --git a/cranelift/src/tools/Cargo.lock b/cranelift/src/tools/Cargo.lock index 90722ef5e7..91e9a5fae4 100644 --- a/cranelift/src/tools/Cargo.lock +++ b/cranelift/src/tools/Cargo.lock @@ -3,7 +3,7 @@ name = "cretonne-tools" version = "0.0.0" dependencies = [ "cretonne 0.0.0", - "ctonfile 0.0.0", + "cretonne-reader 0.0.0", ] [[package]] @@ -11,7 +11,7 @@ name = "cretonne" version = "0.0.0" [[package]] -name = "ctonfile" +name = "cretonne-reader" version = "0.0.0" dependencies = [ "cretonne 0.0.0", diff --git a/cranelift/src/tools/Cargo.toml b/cranelift/src/tools/Cargo.toml index b4477bd1e8..5811ca9a1a 100644 --- a/cranelift/src/tools/Cargo.toml +++ b/cranelift/src/tools/Cargo.toml @@ -11,4 +11,4 @@ path = "main.rs" [dependencies] cretonne = { path = "../libcretonne" } -ctonfile = { path = "../libctonfile" } +cretonne-reader = { path = "../libreader" } diff --git a/cranelift/src/tools/main.rs b/cranelift/src/tools/main.rs index 33cc1afe81..97b261d22d 100644 --- a/cranelift/src/tools/main.rs +++ b/cranelift/src/tools/main.rs @@ -1,5 +1,5 @@ extern crate cretonne; -extern crate ctonfile; +extern crate cton_reader; fn main() {}