Add 128bit Rust BPF test (#4766)

automerge
This commit is contained in:
Jack May
2019-06-21 02:43:50 -07:00
committed by Grimes
parent 9c5a3cd277
commit 407db65336
10 changed files with 112 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
/target/
Cargo.lock

View File

@@ -0,0 +1,19 @@
# Note: This crate must be built using build.sh
[package]
name = "solana-bpf-rust-128bit-dep"
version = "0.16.0"
description = "Solana BPF many-args-dep program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.0" }
[workspace]
members = []

View File

@@ -0,0 +1,6 @@
[dependencies.compiler_builtins]
path = "../../../../sdk/bpf/dependencies/rust-bpf-sysroot/src/compiler-builtins"
features = ["c", "mem"]
[target.bpfel-unknown-unknown.dependencies]
alloc = { path = "../../../../sdk/bpf/dependencies/rust-bpf-sysroot/src/liballoc" }

View File

@@ -0,0 +1,9 @@
//! @brief Solana Rust-based BPF program utility functions and types
#![no_std]
extern crate solana_sdk_bpf_utils;
pub fn work(x: u128, y: u128) -> u128 {
x + y
}