-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(workspace): Client programs in workspace
Moves the client programs into the workspace, by using custom build profiles in the virtual workspace for the client binaries. This change will allow us to work on the primary client program within the workspace, without having to have loose crates. A new crate, `kona-common-proc`, has been added as an extension of `kona-common` to make clean `main` functions in client programs. The `#[client_entry(<heap_size>)]` attribute will expand to include a `_start` symbol if the binary is being compiled to a supported FPVM target. If not, it will include a `main` symbol, as normal to run on the native hardware.
- Loading branch information
Showing
34 changed files
with
285 additions
and
147 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
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
# Rust target | ||
target | ||
|
||
# Example targets | ||
examples/**/target | ||
|
||
# MacOS dust | ||
.DS_Store | ||
|
||
# Rust target | ||
target/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,3 @@ | ||
# `kona` programs | ||
|
||
This directory contains all client programs checked into `kona`. |
File renamed without changes.
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,18 @@ | ||
[package] | ||
name = "minimal" | ||
version = "0.1.0" | ||
publish = false | ||
edition.workspace = true | ||
authors.workspace = true | ||
license.workspace = true | ||
repository.workspace = true | ||
homepage.workspace = true | ||
|
||
[dependencies] | ||
cfg-if.workspace = true | ||
kona-common = { path = "../../../crates/common" } | ||
kona-common-proc = { path = "../../../crates/common-proc" } | ||
|
||
[[bin]] | ||
name = "minimal" | ||
path = "src/main.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,3 @@ | ||
# `minimal` | ||
|
||
Minimal "Hello, world!" example program using the `kona-common` SDK. |
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
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 @@ | ||
#![no_std] | ||
#![cfg_attr(any(target_arch = "mips", target_arch = "riscv64"), no_main)] | ||
|
||
use kona_common::io; | ||
use kona_common_proc::client_entry; | ||
|
||
extern crate alloc; | ||
|
||
#[client_entry(0xFFFFFFF)] | ||
fn main() { | ||
io::print("Hello, world!\n"); | ||
} |
File renamed without changes.
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,15 @@ | ||
# `kona-optimism` | ||
|
||
This binary contains the client program for executing the Optimism rollup state transition. | ||
|
||
## Modes | ||
|
||
The `kona-optimism` program supports several different modes, each with a separate purpose: | ||
|
||
| Name | Description | | ||
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `online` | Directly fetches external data from trusted providers. To be invoked without the `host` program on native hardware. | | ||
| `fault` | Fetches in external data over the wire through the [`PreimageOracle` ABI][preimage-oracle-abi], supported by the `kona-host` program. Can run on native hardware or one of the supported [Fault Proof VM][fpvm] soft-CPUs. | | ||
|
||
[preimage-oracle-abi]: https://specs.optimism.io/experimental/fault-proof/index.html#pre-image-oracle | ||
[fpvm]: https://static.optimism.io/kona/fpp-dev/targets.html |
6 changes: 3 additions & 3 deletions
6
examples/simple-revm/Cargo.lock → bin/programs/simple-revm/Cargo.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,22 @@ | ||
[package] | ||
name = "simple-revm" | ||
version = "0.1.0" | ||
publish = false | ||
edition.workspace = true | ||
authors.workspace = true | ||
license.workspace = true | ||
repository.workspace = true | ||
homepage.workspace = true | ||
|
||
[dependencies] | ||
anyhow.workspace = true | ||
revm.workspace = true | ||
cfg-if.workspace = true | ||
|
||
kona-common = { path = "../../../crates/common" } | ||
kona-common-proc = { path = "../../../crates/common-proc" } | ||
kona-preimage = { path = "../../../crates/preimage" } | ||
|
||
[[bin]] | ||
name = "simple-revm" | ||
path = "src/main.rs" |
File renamed without changes.
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
Oops, something went wrong.