|
|
1 mês atrás | |
|---|---|---|
| .github | 3 meses atrás | |
| crates | 1 mês atrás | |
| dist | 1 mês atrás | |
| examples | 1 mês atrás | |
| src | 1 mês atrás | |
| tests | 1 mês atrás | |
| .gitignore | 1 mês atrás | |
| .npmignore | 1 mês atrás | |
| CONTRIBUTING.md | 3 meses atrás | |
| Cargo.toml | 1 mês atrás | |
| Makefile | 1 mês atrás | |
| README.md | 2 meses atrás | |
| package.json | 1 mês atrás |
A simple scaffold to bootstrap sBPF Assembly programs.
cargo install --git https://github.com/blueshift-gg/sbpf.git
To view all the commands you can run, type sbpf help. Here are the available commands:
init: Create a new project scaffold.build: Compile into a Solana program executable.deploy: Build and deploy the program.test: Test the deployed program.e2e: Build, deploy, and test a program.clean: Clean up build and deploy artifacts.help: Print this message or the help of the given subcommand(s).
Usage: sbpf <COMMAND>
Commands:
init Create a new project scaffold
build Compile into a Solana program executable
deploy Build and deploy the program
test Test deployed program
e2e Build, deploy and test a program
clean Clean up build and deploy artifacts
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
To create a new project, use the sbpf init command. By default, it initializes a project with Rust tests using Mollusk. You can also initialize a project with TypeScript tests using the --ts-tests option.
sbpf init --help
Create a new project scaffold
Usage: sbpf init [OPTIONS] [NAME]
Arguments:
[NAME] The name of the project to create
Options:
-t, --ts-tests Initialize with TypeScript tests instead of Mollusk Rust tests
-h, --help Print help information
-V, --version Print version information
sbpf init my-project
sbpf init my-project --ts-tests
After initializing the project, you can navigate into the project directory and use other commands to build, deploy, and test your program.
You can override the default linker with a custom linker file by including it in the src directory with the same name as your program. For example:
src/example/example.s
src/example/example.ld
PRs welcome!