Files
scylladb/rust/inc/src/lib.rs
Wojciech Mitros 4ad012cb6a tests: add rust example
The patch includes an example rust source to be used in
c++, and its example use in tests/boost/rust_test.

Signed-off-by: Wojciech Mitros <wojciech.mitros@scylladb.com>
2022-05-11 16:49:31 +02:00

18 lines
258 B
Rust

/*
* Copyright (C) 2022-present ScyllaDB
*/
/*
* SPDX-License-Identifier: (AGPL-3.0-or-later and Apache-2.0)
*/
#[cxx::bridge(namespace = "rust")]
mod ffi {
extern "Rust" {
fn inc(x: i32) -> i32;
}
}
fn inc(x: i32) -> i32 {
x + 1
}