Skip to content

Commit

Permalink
Bump version to 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cecelot committed Mar 2, 2024
1 parent 4f02f97 commit d90d326
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 18 deletions.
7 changes: 4 additions & 3 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion crates/kyac/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kyac"
version = "0.2.0"
version = "0.3.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
3 changes: 2 additions & 1 deletion crates/kyanite/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kyanite"
version = "0.1.0"
version = "0.2.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -14,6 +14,7 @@ colored = "2.0.4"
fern = { version = "0.6.2", features = ["colored"] }
kyac = { path = "../kyac" }
log = "0.4.20"
runtime = { version = "0.2.0", path = "../runtime" }
subprocess = { path = "../subprocess" }
which = "4.4.2"

Expand Down
7 changes: 1 addition & 6 deletions crates/kyanite/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ pub fn compile<I: ArchInstr, F: Frame<I>>(
write!(file, "{}{}", F::header(), instrs).unwrap();
subprocess::handle(subprocess::exec(
"clang",
&[
asm,
"-o",
exe,
&format!("{}/libkyanite_runtime.a", include_dir()),
],
&[asm, "-o", exe, &format!("{}/libruntime.a", include_dir())],
))
.map_err(PipelineError::CompileError)?;
Ok(exe.into())
Expand Down
10 changes: 9 additions & 1 deletion crates/kyanite/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,15 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
Ok(())
}
Commands::Version => {
println!("kyanite {} (kyac {})", kyanite::VERSION, kyac::VERSION);
println!(
"Kyanite:\n{:>12} {:>5}\n{:>12} {:>5}\n{:>12} {:>5}",
"CLI:",
kyanite::VERSION,
"Compiler:",
kyac::VERSION,
"Runtime:",
runtime::VERSION,
);
Ok(())
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/kyanite/src/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn compile(ir: &str, filename: &str) -> Result<String, PipelineError> {
.map_err(PipelineError::CompileError)?;
subprocess::handle(subprocess::exec(
"clang",
&[obj, "-o", exe, "-L", &include_dir(), "-lkyanite_runtime"],
&[obj, "-o", exe, &format!("{}/libruntime.a", include_dir())],
))
.map_err(PipelineError::CompileError)?;
Ok(exe.into())
Expand Down
5 changes: 2 additions & 3 deletions crates/runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "runtime"
version = "0.1.0"
version = "0.2.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -9,8 +9,7 @@ bumpalo = "3.14.0"
lazy_static = "1.4.0"

[lib]
name = "kyanite_runtime"
crate-type = ["staticlib"]
crate-type = ["staticlib", "rlib"]

[lints.clippy]
pedantic = "deny"
2 changes: 2 additions & 0 deletions crates/runtime/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
mod alloc;
mod cmp;
mod print;

pub const VERSION: &str = env!("CARGO_PKG_VERSION");
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
in {
packages.default = pkgs.rustPlatform.buildRustPackage {
pname = "kyanite";
version = "0.2.0";
version = "0.3.0";
src = ./.;
nativeBuildInputs = with pkgs; [
rust-stable
Expand All @@ -43,7 +43,7 @@
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/lib
cp target/release/libkyanite_runtime.a $out/lib/libkyanite_runtime.a
cp target/release/libruntime.a $out/lib/libruntime.a
cp target/release/main $out/bin/kyanite
wrapProgram $out/bin/kyanite \
--set KYANITE_RUNTIME_LIB $out/lib \
Expand Down

0 comments on commit d90d326

Please sign in to comment.