Skip to content

Commit

Permalink
doc: document import of source and binary packages (#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvertes authored and ldez committed Jan 8, 2020
1 parent 9a8a88d commit bb04af2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions interp/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ Package interp provides a complete Go interpreter.
For the Go language itself, refer to the official Go specification
https://golang.org/ref/spec.
Importing packages
Packages can be imported in source or binary form, using the standard
Go import statement. In source form, packages are searched first in the
vendor directory, the preferred way to store source dependencies. If not
found in vendor, sources modules will be searched in GOPATH. Go modules
are not supported yet by yaegi.
Binary form packages are compiled and linked with the interpreter
executable, and exposed to scripts with the Use method. The goexports
command can be used to generate package wrappers.
Custom build tags
Custom build tags allow to control which files in imported source
Expand Down
1 change: 1 addition & 0 deletions stdlib/stdlib.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// +build go1.12,!go1.14

// Package stdlib provides wrappers of standard library packages to be imported natively in Yaegi.
package stdlib

import "reflect"
Expand Down
1 change: 1 addition & 0 deletions stdlib/syscall/syscall.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// +build go1.12,!go1.14

// Package syscall provide wrapper of standard library syscall package for native import in Yaegi.
package syscall

import "reflect"
Expand Down
1 change: 1 addition & 0 deletions stdlib/unsafe/unsafe.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// +build go1.12,!go1.14

// Package unsafe provides wrapper of standard library unsafe package to be imported natively in Yaegi.
package unsafe

import "reflect"
Expand Down

0 comments on commit bb04af2

Please sign in to comment.