Skip to content

Releases: gear-tech/sails

Sails-RS v1.0.0-beta.1

17 Mar 16:52

Choose a tag to compare

Pre-release

What's Changed

BREAKING CHANGE

  • IDL V2 Introduction: Introduced a new version of the Interface Definition Language (IDL V2) along with its specification, Abstract Syntax Tree (AST), parser, and code generator. This new version provides enhanced capabilities and a more structured approach to defining interfaces.
  • Sails Header for Message Routing: Implemented a standardized Sails Header (v1) for asynchronous messages. This header facilitates deterministic routing, improves off-chain decodability, and enables unique service fingerprinting without altering the underlying Gear message layout. Detailed specifications for the header, interface IDs, and ReflectHash are provided.
  • Client Generation Logic Refinement: Updated the client generation process to align with IDL V2 and the new Sails Header. This includes changes to how service methods and events are identified and encoded/decoded, leveraging new ROUTE_ID and INTERFACE_ID constants for improved clarity and efficiency.
  • Comprehensive Documentation: Added new documentation files (IDL_V2_SPEC.md, INTERFACE_ID_SPEC.md, REFLECT_HASH_SPEC.md, SAILS_HEADER_V1_SPEC.md) to thoroughly explain the new specifications and their implications for developers.

Full Changelog: rs/v0.10.2...rs/v1.0.0-beta.1

Sails-RS v0.10.2

24 Dec 10:42

Choose a tag to compare

What's Changed

Full Changelog: rs/v0.10.1...rs/v0.10.2

Sails-RS v0.10.1

10 Dec 09:51

Choose a tag to compare

What's Changed

Full Changelog: rs/v0.10.0...rs/v0.10.1

Sails-RS v0.10.0

03 Dec 10:13

Choose a tag to compare

Bump up Gear crates to v1.10.0

What's New

  • BREAKING CHANGE: New client implementation and code generation by @vobradovich in #1050

What's Changed

New Contributors

Full Changelog: js/v0.5.0...rs/v0.10.0

Sails-RS v0.9.2

03 Oct 14:57

Choose a tag to compare

Bump up Gear crates to v1.9.2

Full Changelog: js/v0.5.0...rs/v0.9.2

Sails-JS v0.5.0

12 Sep 12:25
30ae2c0

Choose a tag to compare

Breaking Changes

  • Implemented QueryBuilder class that provides a convenient way to build and run Sails queries.

From now query functions in Sails and in the lib generated by sails-js-cli return QueryBuilder class instead of the result of the query.

Previous way:

const alice = 'kGkLEU3e3XXkJp2WK4eNpVmSab5xUNL9QtmLPh8QfCL2EgotW';
// Query function accepted originAddress, value, atBlock as direct parameters
const result = await sails.services.ServiceName.queries.QueryName(alice, null, null, functionArg1, functionArg2);

New way:

const alice = 'kGkLEU3e3XXkJp2WK4eNpVmSab5xUNL9QtmLPh8QfCL2EgotW';
// Query function now accepts only function arguments and returns QueryBuilder
const result = await sails.services.ServiceName.queries.QueryName(functionArg1, functionArg2)
  .withAddress(alice)
  .call();

// All QueryBuilder methods are optional
const result = await sails.services.ServiceName.queries.QueryName(functionArg1, functionArg2).call();

// Full configuration example
const result = await sails.services.ServiceName.queries.QueryName(functionArg1, functionArg2)
  .withAddress(alice)
  .withValue(1000000000000n) // 1 VARA
  .withGasLimit(50000000000n)
  .atBlock('0x1234567890abcdef...')
  .call();

Changes

  • Fixed creating messages with a single argument (#1051)

Sails-RS v0.9.1

08 Sep 10:11

Choose a tag to compare

Bump up Gear crates to v1.9.1

What's New

  • Introduce a benchmarking suite for the sails_rs

What's Changed

Full Changelog: js/v0.4.3...rs/v0.9.1

Sails-JS v0.4.3

04 Aug 13:48
c9b5aa3

Choose a tag to compare

Changes

  • Skipped type file generation if types are not present in the IDL
  • Improved encoding / decoding in the TransactionBuilder class
  • Capitalized enum variant names in generated files
  • From now gas can be calculated automatically when using TransactionBuilder's method singAndSend

Sails-RS v0.9.0

01 Aug 14:17

Choose a tag to compare

Bump up Gear crates to v1.9.0

What's New

  • BREAKING CHANGE: the #[export] attribute must be on all methods that should be accessible via message
  • BREAKING CHANGE: use #[sails_rs::event] macro to generate encoding code for event
  • BREAKING CHANGE: require impl Default trait on program with no ctors
  • Improved handling of sync methods without gstd async runtime
  • Changing approach of funcs implementations for services
    • Service methods defined in impl Service with #[sails_rs::service] are moved to Exposure and are no longer accessible directly via the Service type.
    • Exposure implement DerefMut<Target = Service> to allow transparent access to service internals.
    • Event emission (emit_event, emit_eth_event) is permitted only within Exposure methods. This removes the need for statically storing the service route, simplifying event emission logic.
    • Base services no longer need to implement Clone, an extended service must implement Into to destruct into base services
  • new Sails program generation via cargo sails new from precompiled template

What's Changed

  • chore(sails): display slice as hex w/o alloc by @vobradovich in #953
  • chore(sol-gen): rename _encodeReply argument into _callReply by @osipov-mit in #960
  • feat(js): skip types generation if it is not needed by @osipov-mit in #961
  • refactor: use gstd::message_loop only for async ctors and service methods by @techraed in #939
  • feat: introduce Builder to generate IDL and client from program by @vobradovich in #947
  • fix(sol-gen): generated filename starts with capital letter by @osipov-mit in #968
  • feat(client): support to send a message for query with gclient by @vobradovich in #952
  • fix: demo app gclient test by @techraed in #986
  • feat(js): capitalize enum variants, improve TransactionBuilder by @osipov-mit in #983
  • perf(macros): use #[sails_rs::event] macro to generate encoding code for event by @vobradovich in #954
  • feat: extend Syscalls with reply and signal details getters by @vobradovich in #982
  • refactoring(sails-macros-core): Remove clone from the program macro by @techraed in #989
  • feat: Changing approach of funcs implementations for services by @vobradovich in #984
  • chore(macros): require impl Default on program with no ctors by @vobradovich in #997
  • feat(cli): add new program generation and precompiled templates by @vobradovich in #993
  • refactor: do not send reply, if returned data is empty by @techraed in #1001
  • chore: bump gear crates to v1.9.0 by @breathx in #1006

Full Changelog: js/v0.4.2...rs/v0.9.0

Sails-JS v0.4.2

23 May 12:49
e8a268a

Choose a tag to compare

Compatibility

  • Sails-RS v0.8.1
  • Gear v1.8.1

Changes

  • Bump @gear-js/api to v0.42.0 in #933
  • Support Program class from @gear-js/api to keep track on program upgrades in #933