Giter Site home page Giter Site logo

xhyve-bindings's Introduction

Xhyve from Go

The goal of this project is to compile xhyve into a Go package and be able to distribute a Go binary with xhyve embedded.

Currently, the bindings are only for the main() entrypoint in xhyve.c, allowing the Go program to pass in any command line arguments to xhyve. This is a stop-gap for now, and I welcome any effort to make actual Go bindings to the underlying xhyve functions.

Installation

I only tested on OS X Yosemite, which is the first OS X version to have Hypervisor.framework which is what xhyve leverages.

$ go get github.com/tiborvass/xhyve-bindings
$ cd $GOPATH/src/github.com/tiborvass/xhyve-bindings
$ go run main/main.go upstream/test/vmlinuz upstream/test/initrd.gz

Once in the VM, type sudo halt to quit it.

Documentation

Follow Godoc.

Roadmap

  • fork-exec: Go program should be able to run multiple xhyve instances. I suggest we use the reexec package.
  • cross-compiling: We should be able to compile it from Linux. I was thinking of using xgo but any other solution that works should be good.
  • management: Start, Stop and Kill fork-exec'd xhyve instance.
  • pty: Not sure how important this is, but I wanted to have a way to attach and detach from the TTY.

Contributing

Just send pull requests, open issues.

The upstream/ directory is a git subtree. It's the first time I use that functionality so bear with me. Suggestions welcome.

If you need to update upstream, run make clean first, update upstream, and run make. It will apply a small patch upstream.patch that's currently needed.

By using cgo, we're limited to requiring all *.c files at the root of the repository, hence all those symlinks created by generate.sh when doing make. This also means, that no two C files can have the same name.

License

The bindings are under MIT License. For xhyve itself, read https://github.com/mist64/xhyve.

xhyve-bindings's People

Contributors

pierrezurek avatar tiborvass avatar zchee avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.