       (string-trim-right (car (process-lines "cygpath" "-w" path)))
     path))
 
+(defun fstar--make-tramp-file-name (fname)
+  "Convert FNAME to a name on remote host."
+  (with-parsed-tramp-file-name buffer-file-name nil
+    (tramp-make-tramp-file-name method user host fname)))
+
+(defun fstar--tramp-find-executable (prog)
+  "Check if PROG is in the remote path."
+  (with-parsed-tramp-file-name buffer-file-name vec
+    (tramp-find-executable vec prog nil)))
+
 ;;; Debugging
 
 (defvar fstar-debug nil


;;;; Starting the F* subprocess

(defun fstar-subp-buffer-killed ()
  "Kill F* process associated to current buffer."
  (-when-let* ((proc (get-buffer-process (current-buffer))))

     (fstar--log ,kind ,format ,@args)))

;;; Compatibility across F* versions

(defvar-local fstar--vernum nil
  "F*'s version number.")
