| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| |
| // Package build defines interfaces for building executable binaries. |
| package build |
| |
| import ( |
| "v.io/v23/services/binary" |
| ) |
| |
| // Architecture specifies the hardware architecture of a host. |
| type Architecture enum { |
| Amd64 |
| Arm |
| X86 |
| } |
| |
| // Format specifies the file format of a host. |
| type Format enum { |
| Elf |
| Mach |
| Pe |
| } |
| |
| // OperatingSystem specifies the operating system of a host. |
| type OperatingSystem enum { |
| Darwin |
| Linux |
| Windows |
| Android |
| } |
| |
| // File records the name and contents of a file. |
| type File struct { |
| Name string |
| Contents []byte |
| } |
| |
| // Builder describes an interface for building binaries from source. |
| type Builder interface { |
| // Build streams sources to the build server, which then attempts to |
| // build the sources and streams back the compiled binaries. |
| Build(arch Architecture, os OperatingSystem) stream<File,File> ([]byte | error) |
| // Describe generates a description for a binary identified by |
| // the given Object name. |
| Describe(name string) (binary.Description | error) |
| } |