Skip to content

Commit

Permalink
fixes v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
breathx committed Jul 18, 2024
1 parent 4188ff1 commit 00a8ebd
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 63 deletions.
76 changes: 38 additions & 38 deletions Cargo.lock

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

40 changes: 24 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[workspace.package]
version = "0.1.0"
version = "0.1.1"
authors = ["Gear Technologies"]
edition = "2021"
license = "GPL-3.0"
repository = "https://github.com/gear-tech/sails"

[workspace]
resolver = "2"
Expand All @@ -28,18 +29,34 @@ members = [
]

[workspace.dependencies]
# The order matches with publishing order.
sails-macros-core = { path = "sails/macros/core" }
sails-macros = { path = "sails/macros" }
sails-idl-parser = { path = "sails/idl-parser" }
sails-client-gen = { path = "sails/client-gen" }
sails = { package = "sails-rs", path = "sails" }
sails-idl-gen = { path = "sails/idl-gen" }

# Gear deps
gclient = "=1.4.2"
gear-core-errors = "=1.4.2"
gprimitives = { version = "=1.4.2", features = ["codec"] }
gstd = "=1.4.2"
gtest = "=1.4.2"
gwasm-builder = { package = "gear-wasm-builder", version = "=1.4.2" }

# Shared with gear deps
parity-scale-codec = { version = "3.6", default-features = false }
primitive-types = { version = "0.12", default-features = false }
scale-info = { version = "2.11", default-features = false }

# Other deps
anyhow = "1"
const-format = { package = "const_format", version = "0.2" }
convert-case = { package = "convert_case", version = "0.6" }
futures = { version = "0.3", default-features = false }
gclient = "1.4.2"
gear-core-errors = "1.4.2"
genco = "0.17"
git-download = "0.1"
gprimitives = { version = "1.4.2", features = ["codec"] }
gstd = "1.4.2"
gtest = "1.4.2"
gwasm-builder = { package = "gear-wasm-builder", version = "1.4.2" }
handlebars = "4.4"
hashbrown = "0.14"
hex = { version = "0.4", default-features = false }
Expand All @@ -48,19 +65,10 @@ itertools = "0.12"
lalrpop = { version = "0.20", default-features = false }
lalrpop-util = "0.20"
logos = "0.13"
parity-scale-codec = { version = "3.6", default-features = false }
prettyplease = "0.2"
primitive-types = { version = "0.12", default-features = false }
proc-macro-error = "1.0"
proc-macro2 = { version = "1", default-features = false }
quote = "1.0"
sails = { path = "sails", package = "gsails" }
sails-client-gen = { path = "sails/client-gen" }
sails-idl-gen = { path = "sails/idl-gen" }
sails-idl-parser = { path = "sails/idl-parser" }
sails-macros = { path = "sails/macros" }
sails-macros-core = { path = "sails/macros/core" }
scale-info = { version = "2.11", default-features = false }
serde = "1.0"
serde-json = { package = "serde_json", version = "1.0" }
spin = { version = "0.9", default-features = false, features = ["spin_mutex"] }
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Sails is a library for bringing your experience of writing applications utilizin
clarity. It deals with things like:
- eliminating
the necessity of writing some low-level boilerplate code and letting you to stay
focused on your bussiness problem
focused on your business problem
- generated [IDL](https://en.wikipedia.org/wiki/Interface_description_language) file for
your application
- generated client allowing to interact with your application from code written in
Expand All @@ -14,14 +14,16 @@ different languages and executed in different runtimes
---

> [!NOTE]
> The Sails library is published under the name `gsails` on `crates-io`.
> The Sails library is published under the name `sails-rs` on `crates-io`.
>
> Versions in [v0.1.0; v0.1.1] are pinned to v1.4.2 of gear libs.
## Getting started

Add the following to your `Cargo.toml`
```toml
[dependencies]
gsails = "*"
sails-rs = "*"
gstd = { version = "*", features = ["debug"] }
```

Expand All @@ -30,7 +32,7 @@ And then in your `lib.rs`:
```rust
#![no_std]

use gsails::prelude::*;
use sails_rs::prelude::*;
use gstd::debug;

struct MyPing;
Expand Down Expand Up @@ -334,7 +336,7 @@ documentation.
Say you have an application that exposes a service `MyService` with a command `do_something`:

```rust
struct Ouput {
struct Output {
m1: u32,
m2: String,
}
Expand Down Expand Up @@ -389,7 +391,7 @@ fn some_client_code() {
The second option provides you with an option to have your code testable as the generated
code depends on the trait which can be easily mocked.

When it comes to TypeScript, `sails-js` lilbrary can be used to interact with the program. Check out [`sails-js` documentation](js/README.md) for more details.
When it comes to TypeScript, `sails-js` library can be used to interact with the program. Check out [`sails-js` documentation](js/README.md) for more details.

## Examples

Expand Down
5 changes: 3 additions & 2 deletions sails/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[package]
name = "gsails"
name = "sails-rs"
description = "Main abstractions for the Sails framework"
documentation = "https://docs.rs/gsails"
documentation = "https://docs.rs/sails-rs"
readme = "../README.md"
version.workspace = true
authors.workspace = true
edition.workspace = true
Expand Down
1 change: 1 addition & 0 deletions sails/client-gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
anyhow.workspace = true
Expand Down
1 change: 1 addition & 0 deletions sails/idl-gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
convert-case.workspace = true
Expand Down
1 change: 1 addition & 0 deletions sails/idl-parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
Loading

0 comments on commit 00a8ebd

Please sign in to comment.