Skip to content

Commit

Permalink
Renames the crate.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed Dec 13, 2024
1 parent 203a616 commit dd7caec
Show file tree
Hide file tree
Showing 36 changed files with 81 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: rbpf
name: sbpf

on:
push:
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = "solana_rbpf"
name = "solana-sbpf"
version = "0.9.0"
description = "Virtual machine and JIT compiler for eBPF programs"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/rbpf"
repository = "https://github.com/anza-xyz/sbpf"
homepage = "https://solana.com/"
keywords = ["BPF", "eBPF", "interpreter", "JIT", "filtering"]
license = "Apache-2.0"
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# solana_rbpf
# solana-sbpf

SBPF virtual machine

[![Build Status](https://github.com/anza-xyz/sbpf/actions/workflows/main.yml/badge.svg)](https://github.com/anza-xyz/sbpf/actions/workflows/main.yml)
[![Crates.io](https://img.shields.io/crates/v/solana_rbpf.svg)](https://crates.io/crates/solana_rbpf)
[![Crates.io](https://img.shields.io/crates/v/solana-sbpf.svg)](https://crates.io/crates/solana-sbpf)

## Description

Expand All @@ -24,43 +24,43 @@ although the JIT-compiler does not work with Windows at this time.

## Link to the crate

This crate is available from [crates.io](https://crates.io/crates/solana_rbpf),
This crate is available from [crates.io](https://crates.io/crates/solana-sbpf),
so it should work out of the box by adding it as a dependency in your
`Cargo.toml` file:

```toml
[dependencies]
solana_rbpf = "0.9.0"
solana-sbpf = "0.9.0"
```

You can also use the development version from this GitHub repository. This
should be as simple as putting this inside your `Cargo.toml`:

```toml
[dependencies]
solana_rbpf = { git = "https://github.com/anza-xyz/sbpf", branch = "main" }
solana-sbpf = { git = "https://github.com/anza-xyz/sbpf", branch = "main" }
```

Of course, if you prefer, you can clone it locally, possibly hack the crate,
and then indicate the path of your local version in `Cargo.toml`:

```toml
[dependencies]
solana_rbpf = { path = "path/to/solana_rbpf" }
solana-sbpf = { path = "path/to/sbpf" }
```

Then indicate in your source code that you want to use the crate:

```rust,ignore
extern crate solana_rbpf;
extern crate solana_sbpf;
```

## API

The API is pretty well documented inside the source code. You should also be
able to access [an online version of the documentation from
here](https://docs.rs/solana_rbpf/), automatically generated from the
[crates.io](https://crates.io/crates/solana_rbpf)
here](https://docs.rs/solana-sbpf/), automatically generated from the
[crates.io](https://crates.io/crates/solana-sbpf)
version (may not be up-to-date with master branch).
[Examples](examples), [unit tests](tests) and [performance benchmarks](benches)
should also prove helpful.
Expand Down Expand Up @@ -88,7 +88,7 @@ Here are the steps to follow to run an SBPF:
## License

Following the effort of the Rust language project itself in order to ease
integration with other projects, the rbpf crate is distributed under the terms
integration with other projects, the sbpf crate is distributed under the terms
of both the MIT license and the Apache License (Version 2.0).

See [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) for details.
4 changes: 2 additions & 2 deletions benches/elf_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

#![feature(test)]

extern crate solana_rbpf;
extern crate solana_sbpf;
extern crate test;
extern crate test_utils;

use solana_rbpf::{
use solana_sbpf::{
elf::Executable,
program::{BuiltinFunction, BuiltinProgram, FunctionRegistry},
syscalls,
Expand Down
4 changes: 2 additions & 2 deletions benches/jit_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

#![feature(test)]

extern crate solana_rbpf;
extern crate solana_sbpf;
extern crate test;

use solana_rbpf::{
use solana_sbpf::{
elf::Executable, program::BuiltinProgram, verifier::RequisiteVerifier, vm::TestContextObject,
};
use std::{fs::File, io::Read, sync::Arc};
Expand Down
4 changes: 2 additions & 2 deletions benches/memory_mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#![feature(test)]

extern crate rand;
extern crate solana_rbpf;
extern crate solana_sbpf;
extern crate test;

use rand::{rngs::SmallRng, Rng, SeedableRng};
use solana_rbpf::{
use solana_sbpf::{
memory_region::{
AccessType, AlignedMemoryMapping, MemoryRegion, MemoryState, UnalignedMemoryMapping,
},
Expand Down
8 changes: 4 additions & 4 deletions benches/vm_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@

#![feature(test)]

extern crate solana_rbpf;
extern crate solana_sbpf;
extern crate test;

#[cfg(all(feature = "jit", not(target_os = "windows"), target_arch = "x86_64"))]
use solana_rbpf::{
use solana_sbpf::{
ebpf,
memory_region::MemoryRegion,
program::{FunctionRegistry, SBPFVersion},
vm::Config,
};
use solana_rbpf::{
use solana_sbpf::{
elf::Executable, program::BuiltinProgram, verifier::RequisiteVerifier, vm::TestContextObject,
};
use std::{fs::File, io::Read, sync::Arc};
Expand Down Expand Up @@ -83,7 +83,7 @@ fn bench_jit_vs_interpreter(
instruction_meter: u64,
mem: &mut [u8],
) {
let mut executable = solana_rbpf::assembler::assemble::<TestContextObject>(
let mut executable = solana_sbpf::assembler::assemble::<TestContextObject>(
assembly,
Arc::new(BuiltinProgram::new_loader(
config,
Expand Down
8 changes: 4 additions & 4 deletions cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "rbpf_cli"
name = "sbpf_cli"
version = "0.9.0"
description = "CLI to test and analyze eBPF programs"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/rbpf"
repository = "https://github.com/anza-xyz/sbpf"
homepage = "https://solana.com/"
keywords = ["BPF", "eBPF", "interpreter", "JIT"]
edition = "2018"

[dependencies]
solana_rbpf = { path = "../", features = ["debugger"] }
solana-sbpf = { path = "../", features = ["debugger"] }
test_utils = { path = "../test_utils/" }
clap = "3.0.0-beta.2"
2 changes: 1 addition & 1 deletion cli/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use clap::{crate_version, App, Arg};
use solana_rbpf::{
use solana_sbpf::{
aligned_memory::AlignedMemory,
assembler::assemble,
ebpf,
Expand Down
4 changes: 2 additions & 2 deletions examples/disassemble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// the MIT license <http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.

extern crate solana_rbpf;
use solana_rbpf::{
extern crate solana_sbpf;
use solana_sbpf::{
elf::Executable,
program::{BuiltinProgram, FunctionRegistry, SBPFVersion},
static_analysis::Analysis,
Expand Down
4 changes: 2 additions & 2 deletions examples/to_json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ extern crate json;
extern crate elf;
use std::path::PathBuf;

extern crate solana_rbpf;
use solana_rbpf::{
extern crate solana_sbpf;
use solana_sbpf::{
elf::Executable,
program::{BuiltinProgram, FunctionRegistry, SBPFVersion},
static_analysis::Analysis,
Expand Down
8 changes: 4 additions & 4 deletions fuzz/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions fuzz/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "solana_rbpf-fuzz"
name = "solana-sbpf-fuzz"
version = "0.9.0"
authors = ["Automatically generated"]
publish = false
Expand All @@ -15,7 +15,7 @@ num-traits = "0.2"
rayon = "1.5"
test_utils = { path = "../test_utils/" }

[dependencies.solana_rbpf]
[dependencies.solana_sbpf]
path = ".."
features = ["fuzzer-not-safe-for-production"]

Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::mem::size_of;

use arbitrary::{Arbitrary, Unstructured};

use solana_rbpf::vm::Config;
use solana_sbpf::vm::Config;

#[derive(Debug)]
pub struct ConfigTemplate {
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/dumb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::hint::black_box;

use libfuzzer_sys::fuzz_target;

use solana_rbpf::{
use solana_sbpf::{
ebpf,
elf::Executable,
memory_region::MemoryRegion,
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/grammar_aware.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![allow(dead_code)]

use solana_rbpf::insn_builder::{Arch, BpfCode, Cond, Endian, Instruction, MemSize, Source};
use solana_sbpf::insn_builder::{Arch, BpfCode, Cond, Endian, Instruction, MemSize, Source};

#[derive(arbitrary::Arbitrary, Debug, Eq, PartialEq)]
pub enum FuzzedOp {
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/semantic_aware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use std::num::NonZeroI32;

use solana_rbpf::insn_builder::{Arch, BpfCode, Cond, Endian, Instruction, MemSize, Move, Source};
use solana_sbpf::insn_builder::{Arch, BpfCode, Cond, Endian, Instruction, MemSize, Move, Source};

#[derive(arbitrary::Arbitrary, Debug, Eq, PartialEq, Copy, Clone)]
pub struct Register(u8);
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/smart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::hint::black_box;
use libfuzzer_sys::fuzz_target;

use grammar_aware::*;
use solana_rbpf::{
use solana_sbpf::{
ebpf,
elf::Executable,
insn_builder::{Arch, IntoBytes},
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/smart_jit_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use libfuzzer_sys::fuzz_target;

use grammar_aware::*;
use solana_rbpf::{
use solana_sbpf::{
ebpf,
elf::Executable,
insn_builder::{Arch, Instruction, IntoBytes},
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/smarter_jit_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use libfuzzer_sys::fuzz_target;

use semantic_aware::*;
use solana_rbpf::{
use solana_sbpf::{
ebpf,
elf::Executable,
insn_builder::IntoBytes,
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/verify_semantic_aware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use libfuzzer_sys::fuzz_target;

use semantic_aware::*;
use solana_rbpf::{
use solana_sbpf::{
insn_builder::IntoBytes,
program::{BuiltinFunction, FunctionRegistry, SBPFVersion},
verifier::{RequisiteVerifier, Verifier},
Expand Down
2 changes: 1 addition & 1 deletion src/assembler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ fn resolve_label(
/// # Examples
///
/// ```
/// use solana_rbpf::{assembler::assemble, program::BuiltinProgram, vm::{Config, TestContextObject}};
/// use solana_sbpf::{assembler::assemble, program::BuiltinProgram, vm::{Config, TestContextObject}};
/// let executable = assemble::<TestContextObject>(
/// "add64 r1, 0x605
/// mov64 r2, 0x32
Expand Down
Loading

0 comments on commit dd7caec

Please sign in to comment.