-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
beb4698
commit 667ec2f
Showing
10 changed files
with
60 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
val instrument : string -> string list -> unit | ||
val instrument : Fpath.t -> Fpath.t list -> unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
let py_location = C_share_site.Sites.pyc | ||
let py_location = List.map Fpath.v C_share_site.Sites.pyc | ||
|
||
let bin_location = C_share_site.Sites.binc | ||
let bin_location = List.map Fpath.v C_share_site.Sites.binc | ||
|
||
let lib_location = C_share_site.Sites.libc | ||
let lib_location = List.map Fpath.v C_share_site.Sites.libc | ||
|
||
let find location file = | ||
List.find_map | ||
(fun dir -> | ||
let filename = Filename.concat dir file in | ||
if Sys.file_exists filename then Some filename else None ) | ||
let filename = Fpath.append dir file in | ||
match Bos.OS.File.exists filename with | ||
| Ok true -> Some filename | ||
| Ok false -> None | ||
| Error (`Msg msg) -> failwith msg ) | ||
location | ||
|
||
let get_libc () = find bin_location "libc.wasm" | ||
let get_libc () = find bin_location (Fpath.v "libc.wasm") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
val py_location : string list | ||
val py_location : Fpath.t list | ||
|
||
val bin_location : string list | ||
val bin_location : Fpath.t list | ||
|
||
val lib_location : string list | ||
val lib_location : Fpath.t list | ||
|
||
val get_libc : unit -> string option | ||
val get_libc : unit -> Fpath.t option |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ val cmd : | |
-> string | ||
-> int | ||
-> string | ||
-> string list | ||
-> Fpath.t list | ||
-> Fpath.t list | ||
-> bool | ||
-> bool | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters