Add some scaffolding for building more crates.

The src/tools directory contains the cretonne-tools crate which will build
binaries for testing cretonne.

The src/libctonfile directory contains the ctonfile library crate which
provides reading and writing of .cton files.
This commit is contained in:
Jakob Stoklund Olesen
2016-04-08 11:22:30 -07:00
parent 661ac9e7ad
commit 9a6f79a9ba
8 changed files with 69 additions and 1 deletions

View File

@@ -1,2 +1,2 @@
target target
Cargo.lock lib*/Cargo.lock

View File

@@ -2,6 +2,10 @@
authors = ["The Cretonne Project Developers"] authors = ["The Cretonne Project Developers"]
name = "cretonne" name = "cretonne"
version = "0.0.0" version = "0.0.0"
description = "Low-level code generator library"
documentation = "https://cretonne.readthedocs.org/"
repository = "https://github.com/stoklund/cretonne"
publish = false
build = "build.rs" build = "build.rs"
[lib] [lib]

View File

@@ -0,0 +1,12 @@
[package]
authors = ["The Cretonne Project Developers"]
name = "ctonfile"
version = "0.0.0"
publish = false
[lib]
name = "ctonfile"
path = "lib.rs"
[dependencies]
cretonne = { path = "../libcretonne" }

View File

@@ -0,0 +1,12 @@
// ====------------------------------------------------------------------------------------==== //
//
// Cretonne file read/write library
//
// ====------------------------------------------------------------------------------------==== //
//
// The libctonfile library supports reading and writing .cton files. This functionality is needed
// for testing Cretonne, but is not essential for a JIT compiler.
extern crate cretonne;
pub mod parser;

View File

@@ -0,0 +1,2 @@
use cretonne;

19
cranelift/src/tools/Cargo.lock generated Normal file
View File

@@ -0,0 +1,19 @@
[root]
name = "cretonne-tools"
version = "0.0.0"
dependencies = [
"cretonne 0.0.0",
"ctonfile 0.0.0",
]
[[package]]
name = "cretonne"
version = "0.0.0"
[[package]]
name = "ctonfile"
version = "0.0.0"
dependencies = [
"cretonne 0.0.0",
]

View File

@@ -0,0 +1,14 @@
[package]
authors = ["The Cretonne Project Developers"]
name = "cretonne-tools"
version = "0.0.0"
description = "Binaries for testing the Cretonne library"
publish = false
[[bin]]
name = "cretonne"
path = "main.rs"
[dependencies]
cretonne = { path = "../libcretonne" }
ctonfile = { path = "../libctonfile" }

View File

@@ -0,0 +1,5 @@
extern crate cretonne;
extern crate ctonfile;
fn main() {}