|
Express Go is an implementation of Go programming language on the Microsoft Windows platform. The immediate goal of this project is providing Windows developers with Go implementation that can be instantly downloaded and used. More distant target is creation of a platform for the rapid development of applications using Go programming language.
The present release is of beta quality and should be considered work in progress. Some language features are not yet supported and shall be implemented in the near future. More extensive testing is required too.
Go is a new programming language developed at Google. According to the Go authors:
"Go is a general-purpose language designed with systems programming in mind. It is strongly typed and garbage-collected and has explicit support for concurrent programming. Programs are constructed from packages, whose properties allow efficient management of dependencies. The existing implementations use a traditional compile/link model to generate executable binaries."
Detailed information on Go can be found on the official language site at http://golang.org/
The present implementation of the language and libraries corresponds to the official release r60 (2024/09/07) by Google.
Implementation is based on the modified code of gc
Go compiler
and tools, developed at Google. The principal modifications are:
gc
tool chain.
gc
. The executable file format is modeled after
that of Plan 9.
The runtime library does not yet support the following language features:
Implementation of goroutines is single-threaded, that is, the runtime system
acts as if GOMAXPROCS
was fixed to 1
.
Interpreted VM implementation provides a very limited support for multi-threading:
when a goroutine initiates a system call, then a new thread is created for
execution of concurrently running goroutines. The JIT VM implementation does
not yet implement this feature. This means in particular that Go networking
packages that strongly rely on this feature for the time being do not work
with JIT implementation.
Porting of the original library packages is in progress.
These limitations shall be removed in the following releases of Express Go.
The license for the Express Go binary distribution can be found here.
The source code of Go packages is covered by the original BSD-style license.
Distributable Code of Microsoft Visual C++ 2008 Express Edition located in
ng\bin\Microsoft.VC90.CRT
may be distributed only as part of Express Go
binary software in strict conformance with the distribution requirements and
restrictions specified in the file msvc_redist.txt
located in
the distribution root directory.
The most recent release of software can be downloaded at https://www.unicorn-enterprises.com/download/express_go.zip.
Installing is easy. Just download the distribution and unpack its content into any directory on your computer.
ng
This is the root directory of the distribution. It contains the following files:
readme.html | this file |
license.txt | the license |
ng\bin
Contains executable files:
vmgc.exe | Compiler |
vmld.exe | Loader |
vmrun.exe | Virtual machine interpreter |
vmjit.exe | Virtual machine JIT implementation |
govm.dll | Embeddable Go virtual machine |
gc.dll | Garbage collector |
Subdirectory ng\bin\Microsoft.VC90.CRT
contains redistributable libraries of
Microsoft Visual C++.
ng\pkg
Contains pre-built object files for Go library packages.
ng\sdk
Contains the SDK for extending Go with C and C++ code and embedding Go virtual machine in C and C++ applications.
ng\sdk\bin
Contains SDK binaries.
ng\sdk\doc
Contains SDK documentation.
ng\sdk\go
Contains sample Go code to be used with SDK.
ng\sdk\lib
Contains SDK libraries.
ng\sdk\src
Contains the source code for SDK portions and samples.
ng\sdk\wks
Contains a Visual C++ 2008 workspace for building the SDK portions and samples.
ng\src
Contains various Go source files.
ng\src\pkg
Contains source code of Go library packages.
File license.txt
in this directory contains the original BSD-style license for
the package source code.
File gc_all.bat
contains instructions for recompiling the packages from the source
code.
File gc_all_test.bat
contains instructions for building the test versions
of packages from the source code. These versions are intended for use together with
the the gotest
environment described above.
It is assumed that Express Go is installed in the directory c:\util\ng
.
In case of different installation directory, the assignments of environment
variables in the batch files should be modified accordingly.
ng\src\tutorial
Contains a collection Go example programs that accompany "A Tutorial for Go Programming Language" (http://golang.org/doc/go_tutorial.html).
File bld_all.bat
contains instructions for building all examples from
the source code.
To start using Express Go, it is necessary to become familiar with Go language. This can be achieved using the documentation provided on the official language site, in particular, the language specification at http://golang.org/doc/go_spec.html and the tutorial at http://golang.org/doc/go_tutorial.html.
Furthermore, it would be necessary to learn how to use the Express Go tools
described below. The tutorial together with examples provided in ng\src\tutorial
may be used for this purpose. The simple Go source files supplied in ng\src\demo
may be used too.
To compile a Go file, use the following command:
vmgc.exe -I pkgroot -o object source ...
where
pkgroot | root directory for Go packages |
object | name of the object file |
source | name of the source Go file |
There can be multiple -I
options on a command line. Note that at present vmgc
does not support the default package root, therefore at least one -I
option that
specifies location of the runtime package runtime.vmo
must be present.
A command line may contain multiple source files.
The conventional extension for the virtual machine object files is .vmo
.
For example, given that the Express Go software is installed in c:\util\ng
,
the following command line can be used to compile the source Go file hello.go
,
located in the current directory:
c:\util\ng\bin\vmgc.exe -I c:\util\ng\pkg -o hello.vmo hello.go
The object file hello.vmo
will be placed in the current directory.
Note that, according to Go rules, the source code for Go a package may be split
across multiple source files. To compile such a package all source files that
belong to it must be placed on the single command line. For the example,
refer to commands in the batch file ng\src\pkg\gc_all.bat
.
The loader is used to build the virtual machine executable file from the object file
containing the main function. (According to Go rules, such a file must correspond
to the package named main
contained function named main
). The loader will
automatically go through all dependencies and load all required packages, linking
them with the main function. Therefore, only a single name of the main object file
must be supplied on a command line; all other required object files will be
discovered automatically.
To link a main object file, use the following command:
vmld.exe -L pkgroot -o exec object
where
pkgroot | root directory for Go packages |
exec | name of the executable file |
object | name of the object file |
There can be multiple -L
options on a command line. Note that at present vmld
does not support the default package root, therefore at least one -L
option that
specifies location of the runtime package runtime.vmo
must be present.
The conventional extension for the virtual machine executable files is .vmx
.
For example, given that the Express Go software is installed in c:\util\ng
,
the following command line can be used to link the object file hello.vmo
located in the current directory:
c:\util\ng\bin\vmld.exe -L c:\util\ng\pkg -o hello.vmx hello.vmo
The executable file hello.vmx
will be placed in the current directory.
The present implementation does not yet support the libraries of object files, therefore the loader manipulates the individual object files. Support for libraries may be implemented in the following releases of the software.
Note that the loader does not output information on the unresolved references. All such references are considered potential built-in functions implemented by the interpreter. If the interpreter will be not able to resolve any of these references, it will issue corresponding error messages.
To run the virtual machine executable file in the interpreted mode, use the following command:
vmrun.exe [vmflag ...] exec [arg ...]
where
vmflag | optional VM flags |
exec | name of the executable file |
arg | optional command line arguments |
For example, given that the Express Go software is installed in c:\util\ng
,
the executable file hello.vmx
located in the current directory can be
executed as follows:
c:\util\ng\bin\vmrun.exe hello.vmx
Optional VM flags have the following format:
-x:extdll
where extdll
stands for the file path specification of a DLL
implementing an extension package built with the Express Go SDK. This specification
must conform to the requirements set forth for the Windows LoadLibrary
function.
To run the virtual machine executable file in JIT mode, use the following command:
vmjit.exe [vmflag ...] exec [arg ...]
where
vmflag | optional VM flags |
exec | name of the executable file |
arg | optional command line arguments |
For example, given that the Express Go software is installed in c:\util\ng
,
the executable file hello.vmx
located in the current directory can be
executed as follows:
c:\util\ng\bin\vmjit.exe hello.vmx
Optional VM flags have the same format format as specified above for vmrun
.
The following list specifies the status of standard Go packages as supported by Express Go. The following status values are used:
Yes |
supported for both interpreted and JIT implementation |
No |
not supported by both implementations |
Interpreted |
supported only by the interpreted implementation |
Restricted |
some platform specific features of the original gc
implementation are not supported |
Minor bugs |
minor bugs are detected in a few test cases |
The status has been evaluated based on the outcome of the standard tests provided with the Go package distribution. A package is considered supported if all corresponding tests have been successfully passed.
Note that some tests by design require the multi-threading support.
As JIT implementation does not provide such support, the corresponding
package will be marked as unsupported (as, for instance, is the case
for archive/tar
) although actually the package is likely
to be supported.
archive/tar Interpreted (but see note above) archive/zip Yes asn1 Yes big Yes bufio Yes bytes Yes cmath Minor bugs compress/bzip2 Yes compress/flate Yes compress/gzip Yes compress/lzw Yes compress/zlib Yes container/heap Yes container/list Yes container/ring Yes container/vector Yes crypto/aes Yes crypto/blowfish Yes crypto/cast5 Yes crypto/cipher Yes crypto/des Yes crypto/dsa Yes crypto/ecdsa Yes crypto/elliptic Yes crypto/hmac Yes crypto/md4 Yes crypto/md5 Yes crypto/ocsp Yes crypto/openpgp Yes crypto/openpgp/armor Yes crypto/openpgp/elgamal Yes crypto/openpgp/packet Yes crypto/openpgp/s2k Yes crypto/rand Yes crypto/rc4 Yes crypto/ripemd160 Yes crypto/rsa Yes crypto/sha1 Yes crypto/sha256 Yes crypto/sha512 Yes crypto/subtle Yes crypto/tls Yes crypto/twofish Yes crypto/x509 Yes crypto/xtea Yes csv Yes ebnf Yes encoding/ascii85 Yes encoding/base32 Yes encoding/base64 Yes encoding/binary Yes encoding/git85 Yes encoding/hex Yes encoding/pem Yes exec Restricted flag Yes fmt Yes gob Yes go/ast Yes go/parser Yes go/printer Interpreted (but see note above) go/scanner Restricted go/token Yes go/typechecker No go/types Restricted hash/adler32 Yes hash/crc32 Yes hash/crc64 Yes hash/fnv Yes html Yes http No http/cgi No http/fcgi Yes http/spdy Yes image Yes image/draw Yes image/jpeg Yes image/png Yes image/tiff Yes image/ycbcr Yes index/suffixarray Yes io Yes io/ioutil Yes json Yes log No mail Yes math Minor bugs (interpreted); yes (JIT) mime Yes mime/multipart Yes net Restricted netchan No net/textproto Yes os Restricted path Yes path/filepath Restricted rand Yes reflect Yes regexp Yes rpc Interpreted rpc/jsonrpc Interpreted runtime Restricted runtime/debug No scanner Yes smtp Yes sort Yes strconv Yes strings Yes sync Interpreted sync/atomic Yes syscall Restricted tabwriter Yes template Yes template/parse Yes testing/quick Yes testing/script Yes time Restricted unicode Yes url Yes utf16 Yes utf8 Yes websocket Interpreted xml Yes
THE EXPRESS GO SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Express Go software is based on and contains modified portions of several software packages. These packages are copyrighted and distributed as follows:
gc
Go compiler and toolsCopyright (c) 2009 The Go Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Subject to the terms and conditions of this License, Google hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer this implementation of Go, where such license applies only to those patent claims licensable by Google that are necessarily infringed by use of this implementation of Go. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that this implementation of Go or a Contribution incorporated within this implementation of Go constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for this implementation of Go shall terminate as of the date such litigation is filed.
8l
loader)Copyright � 1994-1999 Lucent Technologies Inc. All rights reserved. Portions Copyright � 1995-1997 C H Forsyth ([email protected]) Portions Copyright � 1997-1999 Vita Nuova Limited Portions Copyright � 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com) Portions Copyright � 2004,2006 Bruce Ellis Portions Copyright � 2005-2007 C H Forsyth ([email protected]) Revisions Copyright � 2000-2007 Lucent Technologies Inc. and others Portions Copyright � 2009 The Go Authors. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
libbio
)Copyright � 1994-1999 Lucent Technologies Inc. All rights reserved. Revisions Copyright � 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com). All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
lib9/fmt
)The authors of this software are Rob Pike and Ken Thompson, with contributions from Mike Burrows and Sean Dorward. Copyright (c) 2002-2006 by Lucent Technologies. Portions Copyright (c) 2004 Google Inc. Permission to use, copy, modify, and distribute this software for any purpose without fee is hereby granted, provided that this entire notice is included in all copies of any software which is or includes a copy or modification of this software and in all copies of the supporting documentation for such software. THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES NOR GOOGLE INC MAKE ANY REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
lib9/utf
)The authors of this software are Rob Pike and Ken Thompson. Copyright (c) 1998-2002 by Lucent Technologies. Portions Copyright (c) 2009 The Go Authors. All rights reserved. Permission to use, copy, modify, and distribute this software for any purpose without fee is hereby granted, provided that this entire notice is included in all copies of any software which is or includes a copy or modification of this software and in all copies of the supporting documentation for such software. THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
fdlibm
)Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Developed at SunPro, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice is preserved.
Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers Copyright (c) 1991-1995 by Xerox Corporation. All rights reserved. Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. Copyright (c) 1999-2001 by Hewlett-Packard. All rights reserved. THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
|