Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use binary encoding for CIDs in Executor. #156

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions api/process.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface Executor {
# be available at the process bootContext.
#
# The Process capability is associated to the created process.
execCached @1 (cid :Text, ppid :UInt32, bctx :BootContext) -> (process :Process);
execCached @1 (cid :Data, ppid :UInt32, bctx :BootContext) -> (process :Process);
# Same as Exec, but the bytecode is directly from the BytecodeRegistry.
# Provides a significant performance improvement for medium to large
# WASM streams.
Expand All @@ -24,11 +24,11 @@ interface Executor {
interface BytecodeCache {
# BytecodeCache is used to store WASM byte code. May be implemented with
# anchors or any other means.
put @0 (bytecode :Data) -> (cid :Text);
put @0 (bytecode :Data) -> (cid :Data);
# Put stores the bytecode and returns the cid of the submitted bytecode.
get @1 (cid :Text) -> (bytecode :Data);
get @1 (cid :Data) -> (bytecode :Data);
# Get returns the bytecode matching a cid if there's a match, null otherwise.
has @2 (cid :Text) -> (has :Bool);
has @2 (cid :Data) -> (has :Bool);
# Has returns true if a bytecode identified by the cid has been previously stored.
}

Expand All @@ -45,13 +45,13 @@ interface BootContext {
# passed by the parent process.
pid @0 () -> (pid :UInt32);
# PID of the process.
cid @1 () -> (cid :Text);
cid @1 () -> (cid :Data);
# CID of the process bytecode.
args @2 () -> (args :List(Text));
# CLI arguments.
caps @3 () -> (caps :List(Capability));
# Capabilities.

setPid @4 (pid :UInt32) -> ();
setCid @5 (cid :Text) -> ();
setCid @5 (cid :Data) -> ();
}
255 changes: 112 additions & 143 deletions api/process/process.capnp.go

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

Loading