-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bindings were generated using c-for-go (https://github.com/xlab/c-for-go)
- Loading branch information
Showing
14 changed files
with
1,472 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
# Matches multiple files with brace expansion notation | ||
# Set default charset | ||
[*.{go,c}] | ||
charset = utf-8 | ||
|
||
# 4 space indentation | ||
[*.go] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
all: | ||
all: build test | ||
|
||
.PHONY: build test | ||
|
||
build: | ||
go build ./roc | ||
|
||
test: | ||
go test ./roc/... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
Go bindings for Roc | ||
------------------- | ||
|
||
*Work in progress!* | ||
_Work in progress!_ | ||
|
||
``` | ||
go get github.com/roc-project/roc-go/roc | ||
``` | ||
|
||
# Dependencies | ||
You will need to have libroc and libroc-devel (headers) installed. Refer to official build [instructions](https://roc-project.github.io/roc/docs/building.html) on how to install libroc. There is no official distribution for any os as of now, you will need to install from source. | ||
|
||
# Build | ||
Will not produce any lib/binary. It's just to check for the syntax errors: | ||
|
||
`make build` | ||
|
||
# Test | ||
|
||
`make test` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
GENERATOR: | ||
PackageName: roc | ||
PackageDescription: "Package roc provides Go bindings for libroc" | ||
PackageLicense: "" | ||
Includes: | ||
- ../include/roc/address.h | ||
- ../include/roc/config.h | ||
- ../include/roc/context.h | ||
- ../include/roc/frame.h | ||
- ../include/roc/log.h | ||
- ../include/roc/platform.h | ||
- ../include/roc/receiver.h | ||
- ../include/roc/sender.h | ||
FlagGroups: | ||
- {name: "CFLAGS", flags: [ | ||
"-I\"../include\"", | ||
]} | ||
- {name: "LDFLAGS", flags: [ | ||
"-lroc", | ||
]} | ||
|
||
PARSER: | ||
IncludePaths: ["include", "/usr/lib/gcc/x86_64-redhat-linux/9/include"] | ||
SourcesPaths: | ||
- include/roc/address.h | ||
- include/roc/config.h | ||
- include/roc/context.h | ||
- include/roc/frame.h | ||
- include/roc/log.h | ||
- include/roc/platform.h | ||
- include/roc/receiver.h | ||
- include/roc/sender.h | ||
|
||
TRANSLATOR: | ||
ConstRules: | ||
defines: expand | ||
PtrTips: | ||
function: | ||
- {target: "^roc_address_init$", tips: [ref,0,ref,0]} | ||
- {target: "^roc_address_family$", tips: [ref]} | ||
- {target: "^roc_address_ip$", tips: [ref,arr]} | ||
- {target: "^roc_context", tips: [ref]} | ||
- {target: "^roc_receiver_open$", tips: [ref, ref]} | ||
- {target: "^roc_receiver_bind$", tips: [ref, 0, 0, ref]} | ||
- {target: "^roc_receiver_read$", tips: [ref, ref]} | ||
- {target: "^roc_receiver_close$", tips: [ref]} | ||
- {target: "^roc_sender_open$", tips: [ref, ref]} | ||
- {target: "^roc_sender_bind$", tips: [ref, ref]} | ||
- {target: "^roc_sender_connect$", tips: [ref, 0, 0, ref]} | ||
- {target: "^roc_sender_write$", tips: [ref, ref]} | ||
- {target: "^roc_sender_close$", tips: [ref]} | ||
- {target: "^roc_", tips: [sref, sref, sref, sref, sref]} | ||
Rules: | ||
global: | ||
- {transform: lower} | ||
- {action: accept, from: "^roc_"} | ||
- {action: replace, from: "^roc_", to: _} | ||
- {transform: unexport} | ||
const: | ||
- {transform: export} | ||
- {action: accept, from: "^ROC_"} | ||
- {action: replace, from: "^ROC_", to: _} | ||
type: | ||
- {transform: export} | ||
- {action: replace, from: "_t$"} | ||
function: | ||
- {transform: unexport} | ||
private: | ||
- {transform: unexport} | ||
post-global: | ||
- {action: replace, from: _$} | ||
- {load: snakecase} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// WARNING: This file has automatically been generated on Sun, 03 Nov 2019 20:29:42 CET. | ||
// Code generated by https://git.io/c-for-go. DO NOT EDIT. | ||
|
||
#include "_cgo_export.h" | ||
#include "cgo_helpers.h" | ||
|
||
void roc_log_handler_9e4bbc5e(roc_log_level level, char* component, char* message) { | ||
logHandler9E4BBC5E(level, component, message); | ||
} | ||
|
Oops, something went wrong.