Go support

This is a guide to the features of Go we currently support for using in your FPGA code – the sections match up to the Go spec so you can refer to that if you need more information on a feature. When new features are included they will be highlighted in our Release Notes.

We do not currently support the use of any non-FPGA specific packages in your FPGA code, which includes standard Go packages. This is because they will include elements of the Go language that we do not support. To see a list of the FPGA-targeted packages we provide, please see Go Packages. We have several customers working on their own open source packages for use with our service. If you fancy the challenge of making one too, we’ll be very happy to promote it to our users.

Take a look at our roadmap and feel free to make suggestions if there’s anything you would like to see us support.

Source code representation

Status

fully supported

characters supported  
letters and digits supported  
lexical elements supported  
comments supported  
tokens supported  
semicolons supported  
identifiers supported  
keywords supported  
operators and delimiters supported  
integer literals supported  
floating-point literals supported  
imaginary literals supported  
rune literals supported  
string literals supported  

Types

Status

partially supported

boolean supported  
numeric partial support Floating-point and imaginary numbers are not supported. int and uint are both 32bit.
string unsupported  
array partial support Large multi-dimensional arrays are not supported yet but we’ll be planning the required work soon.
slice unsupported  
struct partial support Channels cannot be placed into structs. Currently we do not support making arrays of structs or placing large arrays (>256 bits) inside structs, but we are currently working to support both.
pointer unsupported  
function partial support Functions passed as arguments are not currently supported
interface unsupported  
map unsupported  
channel partial support Channels must be statically declared. They cannot be placed in an array or struct. They cannot be reassigned, and they do not support specifying a capacity with make, although we are currently working to include this.

Properties of types and values

Status

fully supported

type identity supported  
assignability supported  

Blocks

Status

fully supported

Declarations and scope

Status

partial support

label scopes unsupported  
blank identifier unsupported  
predeclared identifiers partial support All integer types, print and println are supported.
exported identifiers unsupported  
uniqueness of identifiers unsupported  
constant declarations supported  
iota supported  
type declarations supported  
variable declarations partial support Multiple return values are not currently supported but we’re working on it so keep an eye on our Release Notes
short variable declarations partial support Same as above
function declarations supported  
method declarations supported  

Expressions

Status

partial support

operands supported  
qualified identifiers supported  
composite literals supported  
function literals supported  
primary expressions supported  
selectors supported  
method expressions supported Note: Passing methods to functions is not currently supported
method values supported  
index expressions supported  
slice expressions unsupported  
type assertions unsupported  
calls partial support Multiple returns are not supported
passing arguments to … parameters unsupported  
operators partial support Operators relating to pointers are not supported.
arithmetic operators supported  
comparison operators supported  
logical operators supported  
address operators unsupported  
receive operator supported  
conversions supported  
constant expressions partial support builtin calls are currently not supported
order of evaluation unsupported  

Statements

Status

partial support

Built-in functions

Status

partial support

close unsupported  
length and capacity unsupported  
allocation unsupported  
making slices, maps and channels partial support All channels have a buffer size of 1
appending to and copying slices unsupported  
deletion of map elements unsupported  
manipulation of complex numbers unsupported  
handling panics unsupported  
bootstrapping supported  

Packages

Status

fully supported

source file organization supported  
package clause supported  
import declarations supported  

Program initialization and execution

Status

partial support

the zero value supported  
package initialization unsupported  
program execution supported  

Errors

Status

unsupported

Run-time panics

Status

unsupported

System considerations

Status

unsupported

package unsafe unsupported  
size and alignment guarantees unsupported