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:
2
src/.gitignore
vendored
2
src/.gitignore
vendored
@@ -1,2 +1,2 @@
|
||||
target
|
||||
Cargo.lock
|
||||
lib*/Cargo.lock
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
authors = ["The Cretonne Project Developers"]
|
||||
name = "cretonne"
|
||||
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"
|
||||
|
||||
[lib]
|
||||
|
||||
12
src/libctonfile/Cargo.toml
Normal file
12
src/libctonfile/Cargo.toml
Normal 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" }
|
||||
12
src/libctonfile/lib.rs
Normal file
12
src/libctonfile/lib.rs
Normal 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;
|
||||
2
src/libctonfile/parser.rs
Normal file
2
src/libctonfile/parser.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
use cretonne;
|
||||
19
src/tools/Cargo.lock
generated
Normal file
19
src/tools/Cargo.lock
generated
Normal 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",
|
||||
]
|
||||
|
||||
14
src/tools/Cargo.toml
Normal file
14
src/tools/Cargo.toml
Normal 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" }
|
||||
5
src/tools/main.rs
Normal file
5
src/tools/main.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
extern crate cretonne;
|
||||
extern crate ctonfile;
|
||||
|
||||
fn main() {}
|
||||
Reference in New Issue
Block a user