From 88c3d131d5593de63152d3ccbb00cd6fddd2252c Mon Sep 17 00:00:00 2001 From: Guy Repta <50716988+gtrepta@users.noreply.github.com> Date: Fri, 13 Feb 2026 13:57:27 -0600 Subject: [PATCH 01/10] Re-arrange cargo package into workspace --- Cargo.lock | 193 ++++++++---------- Cargo.toml | 17 +- kframework_core/Cargo.toml | 12 ++ .../src}/bin/kore-to-json.rs | 2 +- {src => kframework_core/src}/kore.rs | 0 .../src}/kore/deserialize.rs | 0 {src => kframework_core/src}/kore/lexer.rs | 0 {src => kframework_core/src}/kore/parser.rs | 0 .../src}/kore/serialize.rs | 0 {src => kframework_core/src}/kore/syntax.rs | 0 {src => kframework_core/src}/kore/visitor.rs | 0 {src => kframework_core/src}/lib.rs | 0 {tests => kframework_core/tests}/kore/main.rs | 0 .../tests}/kore/parser.rs | 0 .../tests}/kore/serde.rs | 0 15 files changed, 107 insertions(+), 117 deletions(-) create mode 100644 kframework_core/Cargo.toml rename {src => kframework_core/src}/bin/kore-to-json.rs (95%) rename {src => kframework_core/src}/kore.rs (100%) rename {src => kframework_core/src}/kore/deserialize.rs (100%) rename {src => kframework_core/src}/kore/lexer.rs (100%) rename {src => kframework_core/src}/kore/parser.rs (100%) rename {src => kframework_core/src}/kore/serialize.rs (100%) rename {src => kframework_core/src}/kore/syntax.rs (100%) rename {src => kframework_core/src}/kore/visitor.rs (100%) rename {src => kframework_core/src}/lib.rs (100%) rename {tests => kframework_core/tests}/kore/main.rs (100%) rename {tests => kframework_core/tests}/kore/parser.rs (100%) rename {tests => kframework_core/tests}/kore/serde.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 165f99d..740f628 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "anstream" -version = "0.6.17" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23a1e53f0f5d86382dafe1cf314783b2044280f406e7e1506368220ad11b1338" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ "anstyle", "anstyle-parse", @@ -19,43 +19,44 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.9" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] name = "anstyle-parse" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.2" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ "windows-sys", ] [[package]] name = "anstyle-wincon" -version = "3.0.6" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", + "once_cell_polyfill", "windows-sys", ] [[package]] name = "clap" -version = "4.5.20" +version = "4.5.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" +checksum = "63be97961acde393029492ce0be7a1af7e323e6bae9511ebfac33751be5e6806" dependencies = [ "clap_builder", "clap_derive", @@ -63,9 +64,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.20" +version = "4.5.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" +checksum = "7f13174bda5dfd69d7e947827e5af4b0f2f94a4a3ee92912fba07a66150f21e2" dependencies = [ "anstream", "anstyle", @@ -75,9 +76,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.18" +version = "4.5.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" +checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" dependencies = [ "heck", "proc-macro2", @@ -87,15 +88,15 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831" [[package]] name = "colorchoice" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "heck" @@ -105,24 +106,27 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "indoc" -version = "2.0.5" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" +checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" +dependencies = [ + "rustversion", +] [[package]] name = "is_terminal_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] -name = "kframework" +name = "kframework_core" version = "0.1.0" dependencies = [ "clap", @@ -131,50 +135,70 @@ dependencies = [ "serde_json", ] +[[package]] +name = "kframework_ffi" +version = "0.1.0" + [[package]] name = "memchr" -version = "2.7.4" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.37" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" dependencies = [ "proc-macro2", ] [[package]] -name = "ryu" -version = "1.0.18" +name = "rustversion" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "serde" -version = "1.0.214" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.214" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", @@ -183,14 +207,15 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ "itoa", "memchr", - "ryu", "serde", + "serde_core", + "zmij", ] [[package]] @@ -201,9 +226,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.85" +version = "2.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" +checksum = "6e614ed320ac28113fa64972c4262d5dbc89deacdfd00c34a3e4cea073243c12" dependencies = [ "proc-macro2", "quote", @@ -212,9 +237,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e" [[package]] name = "utf8parse" @@ -223,74 +248,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] -name = "windows-sys" -version = "0.59.0" +name = "windows-link" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets", -] +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] -name = "windows-targets" -version = "0.52.6" +name = "windows-sys" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows-link", ] [[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" +name = "zmij" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/Cargo.toml b/Cargo.toml index 05c2762..8bda82f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,17 @@ -[package] -name = "kframework" +[workspace] +resolver = "2" + +members = [ + "kframework_core", + "kframework_ffi", +] + +[workspace.package] version = "0.1.0" -edition = "2021" +rust-version = "1.85.0" -[dependencies] +[workspace.dependencies] clap = { version = "4.5.20", features = ["derive"] } serde = { version = "1.0.214", features = ["derive"] } serde_json = "1.0.132" - -[dev-dependencies] indoc = "2.0.5" diff --git a/kframework_core/Cargo.toml b/kframework_core/Cargo.toml new file mode 100644 index 0000000..c5bc996 --- /dev/null +++ b/kframework_core/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "kframework_core" +version = "0.1.0" +edition = "2021" + +[dependencies] +clap = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } + +[dev-dependencies] +indoc = { workspace = true } diff --git a/src/bin/kore-to-json.rs b/kframework_core/src/bin/kore-to-json.rs similarity index 95% rename from src/bin/kore-to-json.rs rename to kframework_core/src/bin/kore-to-json.rs index 178ab03..ff8927c 100644 --- a/src/bin/kore-to-json.rs +++ b/kframework_core/src/bin/kore-to-json.rs @@ -4,7 +4,7 @@ use std::path::PathBuf; use clap::Parser; -use kframework::kore; +use kframework_core::kore; #[derive(Parser)] /// Parse a textual KORE pattern from a file and convert it to JSON diff --git a/src/kore.rs b/kframework_core/src/kore.rs similarity index 100% rename from src/kore.rs rename to kframework_core/src/kore.rs diff --git a/src/kore/deserialize.rs b/kframework_core/src/kore/deserialize.rs similarity index 100% rename from src/kore/deserialize.rs rename to kframework_core/src/kore/deserialize.rs diff --git a/src/kore/lexer.rs b/kframework_core/src/kore/lexer.rs similarity index 100% rename from src/kore/lexer.rs rename to kframework_core/src/kore/lexer.rs diff --git a/src/kore/parser.rs b/kframework_core/src/kore/parser.rs similarity index 100% rename from src/kore/parser.rs rename to kframework_core/src/kore/parser.rs diff --git a/src/kore/serialize.rs b/kframework_core/src/kore/serialize.rs similarity index 100% rename from src/kore/serialize.rs rename to kframework_core/src/kore/serialize.rs diff --git a/src/kore/syntax.rs b/kframework_core/src/kore/syntax.rs similarity index 100% rename from src/kore/syntax.rs rename to kframework_core/src/kore/syntax.rs diff --git a/src/kore/visitor.rs b/kframework_core/src/kore/visitor.rs similarity index 100% rename from src/kore/visitor.rs rename to kframework_core/src/kore/visitor.rs diff --git a/src/lib.rs b/kframework_core/src/lib.rs similarity index 100% rename from src/lib.rs rename to kframework_core/src/lib.rs diff --git a/tests/kore/main.rs b/kframework_core/tests/kore/main.rs similarity index 100% rename from tests/kore/main.rs rename to kframework_core/tests/kore/main.rs diff --git a/tests/kore/parser.rs b/kframework_core/tests/kore/parser.rs similarity index 100% rename from tests/kore/parser.rs rename to kframework_core/tests/kore/parser.rs diff --git a/tests/kore/serde.rs b/kframework_core/tests/kore/serde.rs similarity index 100% rename from tests/kore/serde.rs rename to kframework_core/tests/kore/serde.rs From 7bae84b0c511d53708b00e3d73b9c4a3dc09c9b3 Mon Sep 17 00:00:00 2001 From: Guy Repta <50716988+gtrepta@users.noreply.github.com> Date: Fri, 13 Feb 2026 13:59:05 -0600 Subject: [PATCH 02/10] Fix checks --- kframework_ffi/src/kllvm/pattern.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kframework_ffi/src/kllvm/pattern.rs b/kframework_ffi/src/kllvm/pattern.rs index 2638e2b..b571ecb 100644 --- a/kframework_ffi/src/kllvm/pattern.rs +++ b/kframework_ffi/src/kllvm/pattern.rs @@ -28,7 +28,7 @@ impl FromStr for Pattern { }; let pattern = unsafe { ffi::kore_pattern_parse(c_str) }; let _ = unsafe { CString::from_raw(c_str) }; // Free the CString memory - Ok(Self { pattern: pattern }) + Ok(Self { pattern }) } } From a8b0f0dbfcf52ac6fa829d10bae2439d0a2b2dcf Mon Sep 17 00:00:00 2001 From: Guy Repta <50716988+gtrepta@users.noreply.github.com> Date: Fri, 13 Feb 2026 14:08:22 -0600 Subject: [PATCH 03/10] Update package name in tests --- kframework_core/tests/kore/parser.rs | 2 +- kframework_core/tests/kore/serde.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kframework_core/tests/kore/parser.rs b/kframework_core/tests/kore/parser.rs index 0df704c..47d1e95 100644 --- a/kframework_core/tests/kore/parser.rs +++ b/kframework_core/tests/kore/parser.rs @@ -1,4 +1,4 @@ -use kframework::kore::{ +use kframework_core::kore::{ App, Definition, Id, Module, Parser, Pattern, SVar, Sentence, SetVarId, Sort, SymbolId, Var, }; diff --git a/kframework_core/tests/kore/serde.rs b/kframework_core/tests/kore/serde.rs index 2d65cc6..deacbd5 100644 --- a/kframework_core/tests/kore/serde.rs +++ b/kframework_core/tests/kore/serde.rs @@ -4,7 +4,7 @@ macro_rules! sort_tests { use indoc::indoc; use serde_json; - use kframework::kore::Parser; + use kframework_core::kore::Parser; $( #[test] @@ -27,7 +27,7 @@ macro_rules! sort_tests { use indoc::indoc; use serde_json; - use kframework::kore::Parser; + use kframework_core::kore::Parser; $( #[test] @@ -81,7 +81,7 @@ macro_rules! pattern_tests { use indoc::indoc; use serde_json; - use kframework::kore::Parser; + use kframework_core::kore::Parser; $( #[test] @@ -103,7 +103,7 @@ macro_rules! pattern_tests { use indoc::indoc; use serde_json; - use kframework::kore::Parser; + use kframework_core::kore::Parser; $( #[test] From 27420b3c9e10f85f37c419eb49d6f62370c929d2 Mon Sep 17 00:00:00 2001 From: Guy Repta <50716988+gtrepta@users.noreply.github.com> Date: Fri, 13 Feb 2026 14:11:24 -0600 Subject: [PATCH 04/10] Add check-test make target --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 15a9612..6db2b3a 100644 --- a/Makefile +++ b/Makefile @@ -18,8 +18,15 @@ check-fmt: check-clippy: cargo clippy -- --deny warnings +.PHONY: check-test +check-test: check-clippy-test + +.PHONY: check-clippy-test +check-clippy-test: + cargo clippy --tests -- --deny warnings + .PHONY: test -test: +test: check-test cargo test .PHONY: format From 36e3a718385fe91005396ff6ad0e58905cdf939c Mon Sep 17 00:00:00 2001 From: Guy Repta <50716988+gtrepta@users.noreply.github.com> Date: Fri, 13 Feb 2026 15:28:01 -0600 Subject: [PATCH 05/10] Move more fields into the workspace --- Cargo.toml | 1 + kframework_core/Cargo.toml | 5 +++-- kframework_ffi/Cargo.lock | 7 ------- kframework_ffi/Cargo.toml | 4 +++- 4 files changed, 7 insertions(+), 10 deletions(-) delete mode 100644 kframework_ffi/Cargo.lock diff --git a/Cargo.toml b/Cargo.toml index 8bda82f..90b6594 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ members = [ [workspace.package] version = "0.1.0" +edition = "2021" rust-version = "1.85.0" [workspace.dependencies] diff --git a/kframework_core/Cargo.toml b/kframework_core/Cargo.toml index c5bc996..82bbb80 100644 --- a/kframework_core/Cargo.toml +++ b/kframework_core/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "kframework_core" -version = "0.1.0" -edition = "2021" +version.workspace = true +edition.workspace = true +rust-version.workspace = true [dependencies] clap = { workspace = true } diff --git a/kframework_ffi/Cargo.lock b/kframework_ffi/Cargo.lock deleted file mode 100644 index 1d97779..0000000 --- a/kframework_ffi/Cargo.lock +++ /dev/null @@ -1,7 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "kframework_ffi" -version = "0.1.0" diff --git a/kframework_ffi/Cargo.toml b/kframework_ffi/Cargo.toml index 5ca9e28..db14bf4 100644 --- a/kframework_ffi/Cargo.toml +++ b/kframework_ffi/Cargo.toml @@ -1,3 +1,5 @@ [package] name = "kframework_ffi" -version = "0.1.0" +version.workspace = true +edition.workspace = true +rust-version.workspace = true From 61dfd68a03f2eb579b98b56466f7e1f797e9c3a9 Mon Sep 17 00:00:00 2001 From: Guy Repta <50716988+gtrepta@users.noreply.github.com> Date: Wed, 18 Feb 2026 21:29:55 -0600 Subject: [PATCH 06/10] Update fuzzing example --- Cargo.toml | 4 ++++ examples/fuzzer/.gitignore | 5 +++++ examples/fuzzer/Cargo.toml | 2 +- examples/fuzzer/src/main.rs | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 examples/fuzzer/.gitignore diff --git a/Cargo.toml b/Cargo.toml index 90b6594..e788bcb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,10 @@ members = [ "kframework_ffi", ] +exclude = [ + "examples/fuzzer", +] + [workspace.package] version = "0.1.0" edition = "2021" diff --git a/examples/fuzzer/.gitignore b/examples/fuzzer/.gitignore new file mode 100644 index 0000000..ca7b428 --- /dev/null +++ b/examples/fuzzer/.gitignore @@ -0,0 +1,5 @@ +/hfuzz_target +/hfuzz_workspace +/target + +**/*-kompiled diff --git a/examples/fuzzer/Cargo.toml b/examples/fuzzer/Cargo.toml index 5c47adb..cb8ac7b 100644 --- a/examples/fuzzer/Cargo.toml +++ b/examples/fuzzer/Cargo.toml @@ -6,5 +6,5 @@ edition = "2021" [dependencies] arbitrary = "1.4.1" honggfuzz = "0.5.57" -kframework = { path = "../.." } +kframework_core = { path = "../../kframework_core" } kframework_ffi = { path = "../../kframework_ffi" } diff --git a/examples/fuzzer/src/main.rs b/examples/fuzzer/src/main.rs index 9514343..953887e 100644 --- a/examples/fuzzer/src/main.rs +++ b/examples/fuzzer/src/main.rs @@ -2,7 +2,7 @@ use std::panic; use arbitrary::{Arbitrary, Unstructured}; use honggfuzz::fuzz; -use kframework::kore::{App, Parser, Pattern, SymbolId}; +use kframework_core::kore::{App, Parser, Pattern, SymbolId}; use kframework_ffi::kllvm; #[derive(Clone, Copy)] From ba2a2ce829da51247fad565191c166295016eb9f Mon Sep 17 00:00:00 2001 From: Guy Repta <50716988+gtrepta@users.noreply.github.com> Date: Wed, 18 Feb 2026 22:03:47 -0600 Subject: [PATCH 07/10] Update rust version in Dockerfiles --- .github/actions/with-docker/Dockerfile | 2 +- .github/actions/with-docker/Dockerfile.fuzz | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/with-docker/Dockerfile b/.github/actions/with-docker/Dockerfile index 7feee90..56c192b 100644 --- a/.github/actions/with-docker/Dockerfile +++ b/.github/actions/with-docker/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.82.0 +FROM rust:1.85.0 RUN rustup component add clippy rustfmt diff --git a/.github/actions/with-docker/Dockerfile.fuzz b/.github/actions/with-docker/Dockerfile.fuzz index 21d546f..615a0a7 100644 --- a/.github/actions/with-docker/Dockerfile.fuzz +++ b/.github/actions/with-docker/Dockerfile.fuzz @@ -1,5 +1,5 @@ ARG K_VERSION=7.1.241 -ARG RUST_TOOLCHAIN=1.82.0 +ARG RUST_TOOLCHAIN=1.85.0 FROM runtimeverificationinc/kframework-k:ubuntu-jammy-${K_VERSION} AS semantics From 8d728fa08c7122c09992e59776f88a12af364acb Mon Sep 17 00:00:00 2001 From: Guy Repta <50716988+gtrepta@users.noreply.github.com> Date: Thu, 19 Feb 2026 09:58:32 -0600 Subject: [PATCH 08/10] kframework_core => kframework --- Cargo.lock | 2 +- Cargo.toml | 2 +- examples/fuzzer/Cargo.toml | 2 +- examples/fuzzer/src/main.rs | 2 +- {kframework_core => kframework}/Cargo.toml | 2 +- {kframework_core => kframework}/src/bin/kore-to-json.rs | 2 +- {kframework_core => kframework}/src/kore.rs | 0 {kframework_core => kframework}/src/kore/deserialize.rs | 0 {kframework_core => kframework}/src/kore/lexer.rs | 0 {kframework_core => kframework}/src/kore/parser.rs | 0 {kframework_core => kframework}/src/kore/serialize.rs | 0 {kframework_core => kframework}/src/kore/syntax.rs | 0 {kframework_core => kframework}/src/kore/visitor.rs | 0 {kframework_core => kframework}/src/lib.rs | 0 {kframework_core => kframework}/tests/kore/main.rs | 0 {kframework_core => kframework}/tests/kore/parser.rs | 2 +- {kframework_core => kframework}/tests/kore/serde.rs | 8 ++++---- 17 files changed, 11 insertions(+), 11 deletions(-) rename {kframework_core => kframework}/Cargo.toml (90%) rename {kframework_core => kframework}/src/bin/kore-to-json.rs (95%) rename {kframework_core => kframework}/src/kore.rs (100%) rename {kframework_core => kframework}/src/kore/deserialize.rs (100%) rename {kframework_core => kframework}/src/kore/lexer.rs (100%) rename {kframework_core => kframework}/src/kore/parser.rs (100%) rename {kframework_core => kframework}/src/kore/serialize.rs (100%) rename {kframework_core => kframework}/src/kore/syntax.rs (100%) rename {kframework_core => kframework}/src/kore/visitor.rs (100%) rename {kframework_core => kframework}/src/lib.rs (100%) rename {kframework_core => kframework}/tests/kore/main.rs (100%) rename {kframework_core => kframework}/tests/kore/parser.rs (99%) rename {kframework_core => kframework}/tests/kore/serde.rs (98%) diff --git a/Cargo.lock b/Cargo.lock index 740f628..50db7f5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -126,7 +126,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] -name = "kframework_core" +name = "kframework" version = "0.1.0" dependencies = [ "clap", diff --git a/Cargo.toml b/Cargo.toml index e788bcb..0a5b9e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ resolver = "2" members = [ - "kframework_core", + "kframework", "kframework_ffi", ] diff --git a/examples/fuzzer/Cargo.toml b/examples/fuzzer/Cargo.toml index cb8ac7b..afbaa5d 100644 --- a/examples/fuzzer/Cargo.toml +++ b/examples/fuzzer/Cargo.toml @@ -6,5 +6,5 @@ edition = "2021" [dependencies] arbitrary = "1.4.1" honggfuzz = "0.5.57" -kframework_core = { path = "../../kframework_core" } +kframework = { path = "../../kframework" } kframework_ffi = { path = "../../kframework_ffi" } diff --git a/examples/fuzzer/src/main.rs b/examples/fuzzer/src/main.rs index 953887e..9514343 100644 --- a/examples/fuzzer/src/main.rs +++ b/examples/fuzzer/src/main.rs @@ -2,7 +2,7 @@ use std::panic; use arbitrary::{Arbitrary, Unstructured}; use honggfuzz::fuzz; -use kframework_core::kore::{App, Parser, Pattern, SymbolId}; +use kframework::kore::{App, Parser, Pattern, SymbolId}; use kframework_ffi::kllvm; #[derive(Clone, Copy)] diff --git a/kframework_core/Cargo.toml b/kframework/Cargo.toml similarity index 90% rename from kframework_core/Cargo.toml rename to kframework/Cargo.toml index 82bbb80..3eb90e2 100644 --- a/kframework_core/Cargo.toml +++ b/kframework/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "kframework_core" +name = "kframework" version.workspace = true edition.workspace = true rust-version.workspace = true diff --git a/kframework_core/src/bin/kore-to-json.rs b/kframework/src/bin/kore-to-json.rs similarity index 95% rename from kframework_core/src/bin/kore-to-json.rs rename to kframework/src/bin/kore-to-json.rs index ff8927c..178ab03 100644 --- a/kframework_core/src/bin/kore-to-json.rs +++ b/kframework/src/bin/kore-to-json.rs @@ -4,7 +4,7 @@ use std::path::PathBuf; use clap::Parser; -use kframework_core::kore; +use kframework::kore; #[derive(Parser)] /// Parse a textual KORE pattern from a file and convert it to JSON diff --git a/kframework_core/src/kore.rs b/kframework/src/kore.rs similarity index 100% rename from kframework_core/src/kore.rs rename to kframework/src/kore.rs diff --git a/kframework_core/src/kore/deserialize.rs b/kframework/src/kore/deserialize.rs similarity index 100% rename from kframework_core/src/kore/deserialize.rs rename to kframework/src/kore/deserialize.rs diff --git a/kframework_core/src/kore/lexer.rs b/kframework/src/kore/lexer.rs similarity index 100% rename from kframework_core/src/kore/lexer.rs rename to kframework/src/kore/lexer.rs diff --git a/kframework_core/src/kore/parser.rs b/kframework/src/kore/parser.rs similarity index 100% rename from kframework_core/src/kore/parser.rs rename to kframework/src/kore/parser.rs diff --git a/kframework_core/src/kore/serialize.rs b/kframework/src/kore/serialize.rs similarity index 100% rename from kframework_core/src/kore/serialize.rs rename to kframework/src/kore/serialize.rs diff --git a/kframework_core/src/kore/syntax.rs b/kframework/src/kore/syntax.rs similarity index 100% rename from kframework_core/src/kore/syntax.rs rename to kframework/src/kore/syntax.rs diff --git a/kframework_core/src/kore/visitor.rs b/kframework/src/kore/visitor.rs similarity index 100% rename from kframework_core/src/kore/visitor.rs rename to kframework/src/kore/visitor.rs diff --git a/kframework_core/src/lib.rs b/kframework/src/lib.rs similarity index 100% rename from kframework_core/src/lib.rs rename to kframework/src/lib.rs diff --git a/kframework_core/tests/kore/main.rs b/kframework/tests/kore/main.rs similarity index 100% rename from kframework_core/tests/kore/main.rs rename to kframework/tests/kore/main.rs diff --git a/kframework_core/tests/kore/parser.rs b/kframework/tests/kore/parser.rs similarity index 99% rename from kframework_core/tests/kore/parser.rs rename to kframework/tests/kore/parser.rs index 47d1e95..0df704c 100644 --- a/kframework_core/tests/kore/parser.rs +++ b/kframework/tests/kore/parser.rs @@ -1,4 +1,4 @@ -use kframework_core::kore::{ +use kframework::kore::{ App, Definition, Id, Module, Parser, Pattern, SVar, Sentence, SetVarId, Sort, SymbolId, Var, }; diff --git a/kframework_core/tests/kore/serde.rs b/kframework/tests/kore/serde.rs similarity index 98% rename from kframework_core/tests/kore/serde.rs rename to kframework/tests/kore/serde.rs index deacbd5..2d65cc6 100644 --- a/kframework_core/tests/kore/serde.rs +++ b/kframework/tests/kore/serde.rs @@ -4,7 +4,7 @@ macro_rules! sort_tests { use indoc::indoc; use serde_json; - use kframework_core::kore::Parser; + use kframework::kore::Parser; $( #[test] @@ -27,7 +27,7 @@ macro_rules! sort_tests { use indoc::indoc; use serde_json; - use kframework_core::kore::Parser; + use kframework::kore::Parser; $( #[test] @@ -81,7 +81,7 @@ macro_rules! pattern_tests { use indoc::indoc; use serde_json; - use kframework_core::kore::Parser; + use kframework::kore::Parser; $( #[test] @@ -103,7 +103,7 @@ macro_rules! pattern_tests { use indoc::indoc; use serde_json; - use kframework_core::kore::Parser; + use kframework::kore::Parser; $( #[test] From a0ff95eaf4413de833d44aabf1a92d7e058c6a9d Mon Sep 17 00:00:00 2001 From: Guy Repta <50716988+gtrepta@users.noreply.github.com> Date: Thu, 19 Feb 2026 10:10:41 -0600 Subject: [PATCH 09/10] Make check-clippy also check tests --- Makefile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 6db2b3a..6382637 100644 --- a/Makefile +++ b/Makefile @@ -17,16 +17,10 @@ check-fmt: .PHONY: check-clippy check-clippy: cargo clippy -- --deny warnings - -.PHONY: check-test -check-test: check-clippy-test - -.PHONY: check-clippy-test -check-clippy-test: cargo clippy --tests -- --deny warnings .PHONY: test -test: check-test +test: cargo test .PHONY: format From 9b80887164279935f29b87a4aa8b376ad4d4a5c5 Mon Sep 17 00:00:00 2001 From: Guy Repta <50716988+gtrepta@users.noreply.github.com> Date: Thu, 19 Feb 2026 10:59:10 -0600 Subject: [PATCH 10/10] Clippy checks all targets --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6382637..deb05a5 100644 --- a/Makefile +++ b/Makefile @@ -16,8 +16,7 @@ check-fmt: .PHONY: check-clippy check-clippy: - cargo clippy -- --deny warnings - cargo clippy --tests -- --deny warnings + cargo clippy --all-targets -- --deny warnings .PHONY: test test: