forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
80 additions
and
0 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
21 changes: 21 additions & 0 deletions
21
sdk/cargo-build-sbf/tests/crates/package-metadata/Cargo.toml
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,21 @@ | ||
[package] | ||
name = "package-metadata" | ||
version = "2.1.0" | ||
description = "Solana SBF test program with tools version in package metadata" | ||
authors = ["Anza Maintainers <[email protected]>"] | ||
repository = "https://github.com/anza-xyz/agave" | ||
license = "Apache-2.0" | ||
homepage = "https://anza.xyz" | ||
edition = "2021" | ||
publish = false | ||
|
||
[package.metadata.solana] | ||
tools-version = "v1.43" | ||
|
||
[dependencies] | ||
solana-program = { path = "../../../../program", version = "=2.1.0" } | ||
|
||
[lib] | ||
crate-type = ["cdylib"] | ||
|
||
[workspace] |
12 changes: 12 additions & 0 deletions
12
sdk/cargo-build-sbf/tests/crates/package-metadata/src/lib.rs
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,12 @@ | ||
//! Example Rust-based SBF noop program | ||
use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey}; | ||
|
||
solana_program::entrypoint!(process_instruction); | ||
fn process_instruction( | ||
_program_id: &Pubkey, | ||
_accounts: &[AccountInfo], | ||
_instruction_data: &[u8], | ||
) -> ProgramResult { | ||
Ok(()) | ||
} |
21 changes: 21 additions & 0 deletions
21
sdk/cargo-build-sbf/tests/crates/workspace-metadata/Cargo.toml
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,21 @@ | ||
[package] | ||
name = "workspace-metadata" | ||
version = "2.1.0" | ||
description = "Solana SBF test program with tools version in workspace metadata" | ||
authors = ["Anza Maintainers <[email protected]>"] | ||
repository = "https://github.com/anza-xyz/agave" | ||
license = "Apache-2.0" | ||
homepage = "https://anza.xyz" | ||
edition = "2021" | ||
publish = false | ||
|
||
[dependencies] | ||
solana-program = { path = "../../../../program", version = "=2.1.0" } | ||
|
||
[lib] | ||
crate-type = ["cdylib"] | ||
|
||
[workspace] | ||
|
||
[workspace.metadata.solana] | ||
tools-version = "v1.43" |
12 changes: 12 additions & 0 deletions
12
sdk/cargo-build-sbf/tests/crates/workspace-metadata/src/lib.rs
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,12 @@ | ||
//! Example Rust-based SBF noop program | ||
use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey}; | ||
|
||
solana_program::entrypoint!(process_instruction); | ||
fn process_instruction( | ||
_program_id: &Pubkey, | ||
_accounts: &[AccountInfo], | ||
_instruction_data: &[u8], | ||
) -> ProgramResult { | ||
Ok(()) | ||
} |