wolffcm / flatbuffers-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flatbuffers Example

This repo contains tests that exercise passing flatbuffers between Go and Rust.

A simple flatbuffers schema for an expression tree is contained in tree.fbs. Generated code produced by flatc --rust is in ./rust/expr_tree/src/tree_generated.rs. The Go counterpart is in ./tree/*.go.

Go code in evaluation can build simple expression trees as flatbuffers and evaluate them.
Likewise, Rust code in rust/expr_tree/src/lib.rs does the same.

To build:

cd rust/expr_tree
cargo build --lib --release
cd -
go test ./...

Relevant tests are in ./evaluation/rust_eval_test.go.

About


Languages

Language:Rust 67.3%Language:Go 30.0%Language:C 2.7%