From 810a90e3222e33af36433a799627098e71df8198 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. --- src/libcretonne/write.rs | 2 +- src/{libctonfile => libreader}/Cargo.toml | 4 ++-- src/{libctonfile => libreader}/lexer.rs | 0 src/{libctonfile => libreader}/lib.rs | 4 ++-- src/{libctonfile => libreader}/parser.rs | 0 src/test-all.sh | 4 ++-- src/tools/Cargo.lock | 4 ++-- src/tools/Cargo.toml | 2 +- src/tools/main.rs | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) rename src/{libctonfile => libreader}/Cargo.toml (78%) rename src/{libctonfile => libreader}/lexer.rs (100%) rename src/{libctonfile => libreader}/lib.rs (82%) rename src/{libctonfile => libreader}/parser.rs (100%) diff --git a/src/libcretonne/write.rs b/src/libcretonne/write.rs index 7281294fe6..f245d977c2 100644 --- a/src/libcretonne/write.rs +++ b/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/src/libctonfile/Cargo.toml b/src/libreader/Cargo.toml similarity index 78% rename from src/libctonfile/Cargo.toml rename to src/libreader/Cargo.toml index 7b2826b072..478ee3b586 100644 --- a/src/libctonfile/Cargo.toml +++ b/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/src/libctonfile/lexer.rs b/src/libreader/lexer.rs similarity index 100% rename from src/libctonfile/lexer.rs rename to src/libreader/lexer.rs diff --git a/src/libctonfile/lib.rs b/src/libreader/lib.rs similarity index 82% rename from src/libctonfile/lib.rs rename to src/libreader/lib.rs index 9dcb169b7d..2d63e68264 100644 --- a/src/libctonfile/lib.rs +++ b/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/src/libctonfile/parser.rs b/src/libreader/parser.rs similarity index 100% rename from src/libctonfile/parser.rs rename to src/libreader/parser.rs diff --git a/src/test-all.sh b/src/test-all.sh index 6838b1544f..4fe15bdca2 100755 --- a/src/test-all.sh +++ b/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/src/tools/Cargo.lock b/src/tools/Cargo.lock index 90722ef5e7..91e9a5fae4 100644 --- a/src/tools/Cargo.lock +++ b/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/src/tools/Cargo.toml b/src/tools/Cargo.toml index b4477bd1e8..5811ca9a1a 100644 --- a/src/tools/Cargo.toml +++ b/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/src/tools/main.rs b/src/tools/main.rs index 33cc1afe81..97b261d22d 100644 --- a/src/tools/main.rs +++ b/src/tools/main.rs @@ -1,5 +1,5 @@ extern crate cretonne; -extern crate ctonfile; +extern crate cton_reader; fn main() {}