Skip to content

Commit

Permalink
cleaned up chicken scratch and prepped for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
cool-ant committed Oct 2, 2024
1 parent 658b487 commit e5f4f90
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Note: some doc updates are done here simply because we're more intersted in capt

#### Singleton Tables

[Current doc on Singletons](development/services/rust-service/tables.html#singletons) uses in-place code, rather than a generalized, explicit Singleton construct. Probably worth defining a `Singleton` thing that makes it explicit what's happening. Could be a type def, a struct, or some kind of Trait or Key type.
[Current doc on Singletons](../tables.md) uses in-place code, rather than a generalized, explicit Singleton construct. Probably worth defining a `Singleton` thing that makes it explicit what's happening. Could be a type def, a struct, or some kind of Trait or Key type.

The code snippets I think could be improved are as follows:

Expand All @@ -41,7 +41,7 @@ let mut lastUsed =

#### Externalizing Table definitions and their structs / Code Splitting

The basic Table docs for "[Storing Structs Defined Elsewhere](development/services/rust-service/tables.html#storing-structs-defined-elsewhere)" are outdated.
The basic Table docs for "[Storing Structs Defined Elsewhere](../tables.html)" are outdated.

1. `Reflect` doesn't seem to exist.
2. using the documented `impl WrapMessage { ... }` doesn't seem to work anymore. Updated doc that I believe accomplishes the same thing is below.
Expand Down
13 changes: 9 additions & 4 deletions rust/psibase-macros-test/services/basic-w-query/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
#[psibase::service(name = "basicwquery")]
#[allow(non_snake_case)]
mod service {
// FOR DEMO vvv Used by event definition
use psibase::{
anyhow, serve_content, serve_simple_ui, HttpReply, HttpRequest, Table, WebContentRow,
// FOR DEMO vvv Used by event definition
anyhow,
// FOR DEMO ^^^
serve_content,
serve_simple_ui,
HttpReply,
HttpRequest,
Table,
WebContentRow,
};
// use psibase::anyhow;
// FOR DEMO ^^^

#[table(record = "WebContentRow", index = 0)]
struct WebContentTable;
Expand Down
6 changes: 3 additions & 3 deletions rust/psibase-macros-test/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// #[psibase::service]
// #[allow(non_snake_case)]
// mod service {}
#[psibase::service]
#[allow(non_snake_case)]
mod service {}

mod tests {

Expand Down

0 comments on commit e5f4f90

Please sign in to comment.