Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lsegal/gorb
Auto-generates a native Ruby wrapper stub for a given Go package.
https://github.com/lsegal/gorb
Last synced: about 2 months ago
JSON representation
Auto-generates a native Ruby wrapper stub for a given Go package.
- Host: GitHub
- URL: https://github.com/lsegal/gorb
- Owner: lsegal
- Created: 2016-09-05T00:00:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-09T00:18:08.000Z (about 8 years ago)
- Last Synced: 2024-10-31T06:51:32.547Z (2 months ago)
- Language: Go
- Size: 107 KB
- Stars: 33
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gorb
```sh
go<->rb
```gorb provides a tool `gorbgen` to generate a native Ruby wrapper for a given Go
package into the `ext/` directory. The module name generated will be
relative to the package directory you run `gorbgen` from.## Installing
```sh
$ go get -a github.com/lsegal/gorb/...
$ go install github.com/lsegal/gorb/cmd/gorbgen
```## Requirements
Currently, this project only works under Linux. See the
Docker notes below for testing in a working environment.## Docker
You can use Docker to run the examples:
```sh
cd $GOPATH/github.com/lsegal/gorb
docker build -t lsegal/gorb .
sh start-docker.sh
```## Usage Example
Here is an example of running the built-in `Test::Fib::Fibonacci` package:
```sh
cd $GOPATH/github.com/lsegal/gorb
gorbgen -build test/fib
ruby ext/test/fib/test_fib.rb
```## Run Tests
To run acceptance tests:
```sh
$ ./test/test.sh
```Tests pass if exit code is 0.
## TODO
- [ ] Support for slices, maps, complex pointer types.
- [x] Support for basic slice types (string, bool, int, float64).
- [x] Support for pass-by-value structs (partial value type support).
- [x] Support for external packages (partial support for local packages).
- [x] Support for error returns (as exceptions?).
- [x] Support for blocks
- [ ] Compilation support for other systems (Windows not supported).## License
Licensed under the BSD license. Copyright Loren Segal 2016.