Module B0_ssh

module B0_ssh: sig .. end
B0 support for SSH and rsync.

This module provides indirect variant schemes to run builds through SSH. This gives you a cheap and easier (but somehow slow) form of cross-compilation.

The SSH remote need a copy the build program (e.g. b0) with the same version in the current PATH.



Variant schemes


type host = string 
The type for SSH hosts.
val variant_scheme : ?loc:B0.Def.loc ->
?doc:string ->
?name:string ->
?excludes:B0.Fpath.t list ->
?root:B0.Fpath.t -> host -> B0.Variant.Scheme.t -> B0.Variant.Scheme.t
variant_scheme host s is a variant scheme that compiles the project using scheme s on the SSH host host. The source tree is mirrored on the remote machine inside the root (default to .b0_builds) directory. The excludes paths which should be relative to the build root are excluded. name defaults to "ssh-$S" with $S the name of s.

FIXME. excludes should be relative to definition point.


Low-level functions


val get_ssh : unit -> B0.Cmd.t B0.result
get_ssh () looks up an ssh binary in the build's program PATH or in the environment variable B0_SSH if defined.
val get_rsync : unit -> B0.Cmd.t B0.result
get_rsync () looks up an rsync binary in the build's program PATH or in the environment variable B0_RSYNC if defined.