Skip to content

Commit 6a050ac

Browse files
authored
Merge pull request #138 from hyperware-ai/hf/rename
rename
2 parents 7554015 + 4584bbd commit 6a050ac

File tree

20 files changed

+98
-106
lines changed

20 files changed

+98
-106
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ If applicable, add screenshots to help explain your problem.
2626
**Desktop (please complete the following information):**
2727
- OS: [e.g. iOS]
2828
- Browser [e.g. chrome, safari]
29-
- Kinode version [e.g. v1.0.0]
29+
- Hyperware version [e.g. v1.0.0]
3030
- process_lib version [e.g. v1.0.0]
3131

3232
**Additional context**

Cargo.lock

Lines changed: 26 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
2-
name = "kinode_process_lib"
2+
name = "hyperware_process_lib"
33
authors = ["Sybil Technologies AG"]
4-
version = "1.0.1"
4+
version = "1.0.2"
55
edition = "2021"
6-
description = "A library for writing Kinode processes in Rust."
7-
homepage = "https://kinode.org"
8-
repository = "https://github.com/kinode-dao/process_lib"
6+
description = "A library for writing Hyperware processes in Rust."
7+
homepage = "https://hyperware.ai"
8+
repository = "https://github.com/hyperware-ai/process_lib"
99
license = "Apache-2.0"
1010

1111
[features]

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
# `kinode_process_lib`
1+
# `hyperware_process_lib`
22

3-
Library of functions for more ergonomic [Kinode](https://github.com/kinode-dao/kinode) Rust process development.
3+
Library of functions for more ergonomic Hyperware Rust process development.
44

5-
[Documentation can be found here](https://docs.rs/kinode_process_lib).
5+
[Documentation can be found here](https://docs.rs/hyperware_process_lib).
66

7-
[Crate can be found here](https://crates.io/crates/kinode_process_lib).
7+
[Crate can be found here](https://crates.io/crates/hyperware_process_lib).
88

9-
See the [Kinode Book](https://book.kinode.org) for a guide on how to use this library to write Kinode apps in Rust.
10-
11-
The major version of `kinode_process_lib` will always match the major version of Kinode OS.
12-
Since the current major version of both is 0, breaking changes can occur on minor releases.
13-
Once the major version reaches 1, breaking changes will only occur between major versions.
14-
As is, developers may have to update their version of `process_lib` as they update Kinode OS.
9+
See the [Hyperware Book](https://book.hyperware.ai) for a guide on how to use this library to write Hyperware apps in Rust.

kinode-wit/kinode.wit renamed to hyperware-wit/hyperware.wit

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
//
2-
// kinode.wit, copied from https://github.com/kinode-dao/kinode-wit
3-
// https://raw.githubusercontent.com/kinode-dao/kinode-wit/v1.0.0/kinode.wit
4-
//
5-
6-
package kinode:process@1.0.0;
1+
package hyperware:process@1.0.0;
72

83
interface standard {
94

@@ -49,7 +44,7 @@ interface standard {
4944
// expects-response is none, direct response to source of parent.
5045
// also carries forward certain aspects of parent message in kernel,
5146
// see documentation for formal spec and examples:
52-
// https://docs.rs/kinode_process_lib/latest/kinode_process_lib/struct.Request.html
47+
// https://docs.rs/hyperware_process_lib/latest/hyperware_process_lib/struct.Request.html
5348
inherit: bool,
5449
// if some, request expects a response in the given number of seconds
5550
expects-response: option<u64>,
@@ -226,4 +221,4 @@ world process-v1 {
226221
include lib;
227222

228223
export init: func(our: string);
229-
}
224+
}

pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
## Docs Update
1010

11-
[Corresponding docs PR](https://github.com/kinode-dao/kinode-book/pull/my-pr-number)
11+
[Corresponding docs PR](https://github.com/hyperware-ai/hyperware-book/pull/my-pr-number)
1212

1313
## Notes
1414

src/eth.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub enum EthAction {
6868
},
6969
/// Kill a SubscribeLogs subscription of a given ID, to stop getting updates.
7070
UnsubscribeLogs(u64),
71-
/// Raw request. Used by kinode_process_lib.
71+
/// Raw request. Used by hyperware_process_lib.
7272
Request {
7373
chain_id: u64,
7474
method: String,

src/homepage.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::Request;
22

3-
/// Add a new icon and/or widget to the Kinode homepage. Note that the process calling this
3+
/// Add a new icon and/or widget to the Hyperware homepage. Note that the process calling this
44
/// function must have the `homepage:homepage:sys` messaging [`crate::Capability`].
55
///
66
/// This should be called upon process startup to ensure that the process is added to the homepage.
@@ -29,7 +29,7 @@ pub fn add_to_homepage(label: &str, icon: Option<&str>, path: Option<&str>, widg
2929
.unwrap();
3030
}
3131

32-
/// Remove the caller process from the Kinode homepage. Note that the process calling this function
32+
/// Remove the caller process from the Hyperware homepage. Note that the process calling this function
3333
/// must have the `homepage:homepage:sys` messaging [`crate::Capability`].
3434
///
3535
/// This usually isn't necessary as processes are not persisted on homepage between boots.

src/http/server.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,22 +202,22 @@ pub enum HttpServerAction {
202202
},
203203
/// When sent, expects a [`crate::LazyLoadBlob`] containing the WebSocket message bytes to send.
204204
/// Modifies the [`crate::LazyLoadBlob`] by placing into [`HttpServerAction::WebSocketExtPushData`]` with id taken from
205-
/// this [`KernelMessage`]` and `kinode_message_type` set to `desired_reply_type`.
205+
/// this [`KernelMessage`]` and `hyperware_message_type` set to `desired_reply_type`.
206206
WebSocketExtPushOutgoing {
207207
channel_id: u32,
208208
message_type: WsMessageType,
209209
desired_reply_type: MessageType,
210210
},
211211
/// For communicating with the ext.
212-
/// Kinode's http-server sends this to the ext after receiving [`HttpServerAction::WebSocketExtPushOutgoing`].
212+
/// Hyperware's http-server sends this to the ext after receiving [`HttpServerAction::WebSocketExtPushOutgoing`].
213213
/// Upon receiving reply with this type from ext, http-server parses, setting:
214214
/// * id as given,
215215
/// * message type as given ([`crate::Request`] or [`crate::Response`]),
216216
/// * body as [`HttpServerRequest::WebSocketPush`],
217217
/// * [`crate::LazyLoadBlob`] as given.
218218
WebSocketExtPushData {
219219
id: u64,
220-
kinode_message_type: MessageType,
220+
hyperware_message_type: MessageType,
221221
blob: Vec<u8>,
222222
},
223223
/// Sending will close a socket the process controls.
@@ -562,7 +562,7 @@ impl HttpServer {
562562
})
563563
.unwrap(),
564564
)
565-
.blob(crate::kinode::process::standard::LazyLoadBlob {
565+
.blob(crate::hyperware::process::standard::LazyLoadBlob {
566566
mime: content_type.clone(),
567567
bytes: content.clone(),
568568
})

src/kernel_types.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::kinode::process::standard as wit;
1+
use crate::hyperware::process::standard as wit;
22
use crate::{Address, ProcessId};
33
use serde::{Deserialize, Serialize};
44
use std::collections::{HashMap, HashSet};
@@ -7,7 +7,7 @@ use std::hash::{Hash, Hasher};
77
//
88
// process-facing kernel types, used for process
99
// management and message-passing
10-
// matches types in kinode.wit
10+
// matches types in hyperware.wit
1111
//
1212

1313
pub type Context = Vec<u8>;
@@ -265,7 +265,7 @@ impl StateError {
265265
// package types
266266
//
267267

268-
/// Represents the metadata associated with a kinode package, which is an ERC721 compatible token.
268+
/// Represents the metadata associated with a hyperware package, which is an ERC721 compatible token.
269269
/// This is deserialized from the `metadata.json` file in a package.
270270
/// Fields:
271271
/// - `name`: An optional field representing the display name of the package. This does not have to be unique, and is not used for identification purposes.
@@ -284,7 +284,7 @@ pub struct Erc721Metadata {
284284
pub properties: Erc721Properties,
285285
}
286286

287-
/// Represents critical fields of a kinode package in an ERC721 compatible format.
287+
/// Represents critical fields of a hyperware package in an ERC721 compatible format.
288288
/// This follows the [ERC1155](https://github.com/ethereum/ercs/blob/master/ERCS/erc-1155.md#erc-1155-metadata-uri-json-schema) metadata standard.
289289
///
290290
/// Fields:

src/lib.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
//! Kinode process standard library for Rust compiled to Wasm
2-
//! Must be used in context of bindings generated by `kinode.wit`.
1+
//! Hyperware process standard library for Rust compiled to Wasm
2+
//! Must be used in context of bindings generated by `hyperware.wit`.
33
//!
4-
//! This library provides a set of functions for interacting with the kinode
4+
//! This library provides a set of functions for interacting with the hyperware
55
//! kernel interface, which is a WIT file. The types generated by this file
66
//! are available in processes via the wit_bindgen macro, if a process needs
77
//! to use them directly. However, the most convenient way to do most things
@@ -13,11 +13,11 @@
1313
//! for applications that want to maximize composability and introspectability.
1414
//! For blobs, we recommend bincode to serialize and deserialize to bytes.
1515
//!
16-
pub use crate::kinode::process::standard::*;
16+
pub use crate::hyperware::process::standard::*;
1717
use serde_json::Value;
1818

1919
wit_bindgen::generate!({
20-
path: "kinode-wit",
20+
path: "hyperware-wit",
2121
generate_unused_types: true,
2222
world: "lib",
2323
});
@@ -155,7 +155,7 @@ macro_rules! process_println {
155155
///
156156
/// Example:
157157
/// ```no_run
158-
/// use kinode_process_lib::{await_message, println};
158+
/// use hyperware_process_lib::{await_message, println};
159159
///
160160
/// loop {
161161
/// match await_message() {
@@ -185,7 +185,7 @@ pub fn await_next_message_body() -> Result<Vec<u8>, SendError> {
185185
}
186186

187187
/// Spawn a new process. This function is a wrapper around the standard `spawn()` function
188-
/// provided in `kinode::process::standard` (which is generated by the WIT file).
188+
/// provided in `hyperware::process::standard` (which is generated by the WIT file).
189189
pub fn spawn(
190190
name: Option<&str>,
191191
wasm_path: &str,
@@ -194,7 +194,7 @@ pub fn spawn(
194194
grant_capabilities: Vec<(ProcessId, Json)>,
195195
public: bool,
196196
) -> Result<ProcessId, SpawnError> {
197-
crate::kinode::process::standard::spawn(
197+
crate::hyperware::process::standard::spawn(
198198
name,
199199
wasm_path,
200200
&on_exit._to_standard().map_err(|_e| SpawnError::NameTaken)?,
@@ -209,7 +209,7 @@ pub fn spawn(
209209
///
210210
/// Example usage:
211211
/// ```no_run
212-
/// use kinode_process_lib::make_blob;
212+
/// use hyperware_process_lib::make_blob;
213213
/// use bincode;
214214
/// use serde::{Serialize, Deserialize};
215215
///
@@ -244,7 +244,7 @@ where
244244
/// Example:
245245
/// ```no_run
246246
/// use std::collections::{HashMap, HashSet};
247-
/// use kinode_process_lib::get_typed_blob;
247+
/// use hyperware_process_lib::get_typed_blob;
248248
/// use bincode;
249249
/// use serde::{Serialize, Deserialize};
250250
///
@@ -280,7 +280,7 @@ where
280280
/// Example:
281281
/// ```no_run
282282
/// use std::collections::{HashMap, HashSet};
283-
/// use kinode_process_lib::get_typed_state;
283+
/// use hyperware_process_lib::get_typed_state;
284284
/// use bincode;
285285
/// use serde::{Serialize, Deserialize};
286286
///

src/net.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::collections::BTreeMap;
77
//
88

99
/// The data structure used by `net:distro:sys` and the rest of the runtime to
10-
/// represent node identities in the KNS (Kinode Name System).
10+
/// represent node identities in the KNS (Hyperware Name System).
1111
#[derive(Clone, Debug, Serialize, Deserialize)]
1212
pub struct Identity {
1313
pub name: NodeId,

src/scripting/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ macro_rules! script {
1313
struct Component;
1414
impl Guest for Component {
1515
fn init(our: String) {
16-
use kinode_process_lib::{await_message, println, Address, Message, Response};
16+
use hyperware_process_lib::{await_message, println, Address, Message, Response};
1717
let our: Address = our.parse().unwrap();
1818
let Message::Request {
1919
body,
@@ -54,13 +54,13 @@ macro_rules! script {
5454
/// world: "process-v0",
5555
/// });
5656
///
57-
/// kinode_process_lib::widget!("My widget", create_widget);
57+
/// hyperware_process_lib::widget!("My widget", create_widget);
5858
///
5959
/// fn create_widget() -> String {
6060
/// return r#"<html>
6161
/// <head>
6262
/// <meta name="viewport" content="width=device-width, initial-scale=1">
63-
/// <link rel="stylesheet" href="/kinode.css">
63+
/// <link rel="stylesheet" href="/hyperware.css">
6464
/// </head>
6565
/// <body>
6666
/// <h1>Hello World!</h1>
@@ -73,7 +73,7 @@ macro_rules! widget {
7373
struct Component;
7474
impl Guest for Component {
7575
fn init(_our: String) {
76-
use kinode_process_lib::Request;
76+
use hyperware_process_lib::Request;
7777
Request::to(("our", "homepage", "homepage", "sys"))
7878
.body(
7979
serde_json::json!({

src/types/address.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pub use crate::{Address, ProcessId, Request};
22
use serde::{Deserialize, Serialize};
33
use std::hash::{Hash, Hasher};
44

5-
/// Address is defined in `kinode.wit`, but constructors and methods here.
5+
/// Address is defined in `hyperware.wit`, but constructors and methods here.
66
/// An Address is a combination of a node ID (string) and a [`ProcessId`]. It is
77
/// used in the [`Request`]/[`crate::Response`] pattern to indicate which process on a given node
88
/// in the network to direct the message to. The formatting structure for

src/types/lazy_load_blob.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pub use crate::LazyLoadBlob;
44
/// A `LazyLoadBlob` is a piece of data that is only optionally loaded into a process
55
/// (i.e. with `get_blob()`). `LazyLoadBlob` is useful for passing large data in a chain
66
/// of [`crate::Request`]s or [`crate::Response`]s where intermediate processes in the
7-
/// chain don't need to access the data. In this way, Kinode saves time and compute
7+
/// chain don't need to access the data. In this way, Hyperware saves time and compute
88
/// since the `LazyLoadBlob` is not sent back and forth across the Wasm boundary needlessly.
99
impl LazyLoadBlob {
1010
/// Create a new `LazyLoadBlob`. Takes a mime type and a byte vector.

0 commit comments

Comments
 (0)