diff --git a/clojure/resources/parser-dev-linux b/clojure/resources/parser-dev-linux new file mode 100755 index 00000000..4083f973 Binary files /dev/null and b/clojure/resources/parser-dev-linux differ diff --git a/clojure/resources/parser b/clojure/resources/parser-dev-macosx similarity index 100% rename from clojure/resources/parser rename to clojure/resources/parser-dev-macosx diff --git a/clojure/src/firn/org.clj b/clojure/src/firn/org.clj index abf9ac67..a10eafbb 100644 --- a/clojure/src/firn/org.clj +++ b/clojure/src/firn/org.clj @@ -1,4 +1,6 @@ (ns firn.org + + "The org namespace handles all data-related to the parsing of an org file. When an org file is parsed it is organized into a map of data. @@ -50,7 +52,7 @@ [file-str] (if (u/native-image?) (ClojureRust/parseOrg file-str) - (let [parser (str (u/get-cwd) "/resources/parser") + (let [parser (str (u/get-cwd) "/resources/parser-dev-" (u/get-os)) stripped (s/trim-newline file-str) res (sh/sh parser stripped)] (if-not (= (res :exit) 0) @@ -60,7 +62,7 @@ (defn parse-dev! "DevXp func: Useful for testing org strings in the repl." [s] - (let [parser (str (u/get-cwd) "/resources/parser") + (let [parser (str (u/get-cwd) "/resources/parser-dev-" (u/get-os)) stripped (s/trim-newline s) res (sh/sh parser stripped)] (if-not (= (res :exit) 0) diff --git a/clojure/src/firn/util.clj b/clojure/src/firn/util.clj index c7099738..5cb047aa 100644 --- a/clojure/src/firn/util.clj +++ b/clojure/src/firn/util.clj @@ -84,6 +84,12 @@ [] (System/getProperty "user.dir")) +(defn get-os + "Return the name of the host operating system." + [] + (str/replace (str/lower-case (System/getProperty "os.name")) + #" " "")) + (defn snake->kebab "Convert strings with underscores to hyphens." ([s] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index e76b84f6..5b20c949 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -10,7 +10,7 @@ crate_type = ["cdylib"] [dependencies] jni = "0.14.0" -heim = "0.0.10" +heim = "0.0.11" futures = "0.3.1" orgize = "0.8.3" serde_json = "1.0.48"