Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivanshVij committed Oct 5, 2023
2 parents f0e62dc + d435a5d commit 2a6eee6
Show file tree
Hide file tree
Showing 28 changed files with 53 additions and 27 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [v0.4.4] - 2023-08-05

### Features

- Added ability to compile with WASM-32 support (no WASI)

### Fixes

- Fixed a bug where the signature generation would not generate typescript signatures

## [v0.4.3] - 2023-08-04

### Changes
Expand Down Expand Up @@ -271,7 +281,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

- Initial release of the Scale Runtime library.

[unreleased]: https://github.com/loopholelabs/scale/compare/v0.4.3...HEAD
[unreleased]: https://github.com/loopholelabs/scale/compare/v0.4.4...HEAD
[v0.4.4]: https://github.com/loopholelabs/scale/compare/v0.4.4
[v0.4.3]: https://github.com/loopholelabs/scale/compare/v0.4.3
[v0.4.2]: https://github.com/loopholelabs/scale/compare/v0.4.2
[v0.4.1]: https://github.com/loopholelabs/scale/compare/v0.4.1
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "scale_rs"
version = "0.4.3"
version = "0.4.4"
edition = "2021"
description = "Scale is a framework for building high-performance plugin systems into any application, all powered by WebAssembly."
homepage = "https://scale.sh"
Expand Down
1 change: 1 addition & 0 deletions build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ type Target int

const (
WASITarget Target = iota
WASMTarget
)
2 changes: 2 additions & 0 deletions build/golang.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ func LocalGolang(options *LocalGolangOptions) (*scalefunc.Schema, error) {
switch options.Target {
case WASITarget:
target = "wasi"
case WASMTarget:
target = "wasm"
default:
return nil, fmt.Errorf("unknown build target %d", options.Target)
}
Expand Down
2 changes: 2 additions & 0 deletions build/rust.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ func LocalRust(options *LocalRustOptions) (*scalefunc.Schema, error) {
switch options.Target {
case WASITarget:
target = "wasm32-wasi"
case WASMTarget:
target = "wasm32-unknown-unknown"
default:
return nil, fmt.Errorf("unknown build target %d", options.Target)
}
Expand Down
2 changes: 2 additions & 0 deletions build/typescript.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ func LocalTypescript(options *LocalTypescriptOptions) (*scalefunc.Schema, error)
switch options.Target {
case WASITarget:
target = api.PlatformNode
case WASMTarget:
target = api.PlatformBrowser
default:
return nil, fmt.Errorf("unknown build target %d", options.Target)
}
Expand Down
2 changes: 1 addition & 1 deletion integration/golang_tests/generated/generated.go

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

2 changes: 1 addition & 1 deletion integration/golang_tests/host_signature/host.go

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

2 changes: 1 addition & 1 deletion integration/golang_tests/host_signature/types.go

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

2 changes: 1 addition & 1 deletion integration/golang_tests/signature/guest.go

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

2 changes: 1 addition & 1 deletion integration/golang_tests/signature/types.go

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

2 changes: 1 addition & 1 deletion integration/rust_tests/generated/generated.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by scale-signature 0.4.3, DO NOT EDIT.
// Code generated by scale-signature 0.4.4, DO NOT EDIT.
// output: generated

#![allow(dead_code)]
Expand Down
2 changes: 1 addition & 1 deletion integration/rust_tests/signature/guest.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by scale-signature 0.4.3, DO NOT EDIT.
// Code generated by scale-signature 0.4.4, DO NOT EDIT.
// output: local_example_latest_guest

pub mod types;
Expand Down
2 changes: 1 addition & 1 deletion integration/rust_tests/signature/types.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by scale-signature 0.4.3, DO NOT EDIT.
// Code generated by scale-signature 0.4.4, DO NOT EDIT.
// output: local_example_latest_guest

#![allow(dead_code)]
Expand Down
2 changes: 1 addition & 1 deletion integration/typescript_tests/generated/generated.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by scale-signature 0.4.3, DO NOT EDIT.
// Code generated by scale-signature 0.4.4, DO NOT EDIT.
// output: generated

import { Encoder, Decoder, Kind } from "@loopholelabs/polyglot"
Expand Down
2 changes: 1 addition & 1 deletion integration/typescript_tests/generated/generated.js

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

2 changes: 1 addition & 1 deletion integration/typescript_tests/generated/generated.js.map

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

2 changes: 1 addition & 1 deletion integration/typescript_tests/host_signature/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by scale-signature 0.4.3, DO NOT EDIT.
// Code generated by scale-signature 0.4.4, DO NOT EDIT.
// output: local-example-latest-host

/* eslint no-bitwise: off */
Expand Down
2 changes: 1 addition & 1 deletion integration/typescript_tests/host_signature/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by scale-signature 0.4.3, DO NOT EDIT.
// Code generated by scale-signature 0.4.4, DO NOT EDIT.
// output: local-example-latest-host

import { Encoder, Decoder, Kind } from "@loopholelabs/polyglot"
Expand Down
2 changes: 1 addition & 1 deletion integration/typescript_tests/signature/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by scale-signature 0.4.3, DO NOT EDIT.
// Code generated by scale-signature 0.4.4, DO NOT EDIT.
// output: local-example-latest-guest

/* eslint no-bitwise: off */
Expand Down
2 changes: 1 addition & 1 deletion integration/typescript_tests/signature/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by scale-signature 0.4.3, DO NOT EDIT.
// Code generated by scale-signature 0.4.4, DO NOT EDIT.
// output: local-example-latest-guest

import { Encoder, Decoder, Kind } from "@loopholelabs/polyglot"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@loopholelabs/scale",
"version": "0.4.3",
"version": "0.4.4",
"description": "Scale is a framework for building high-performance plugin systems into any application, all powered by WebAssembly.",
"source": "index.ts",
"types": "types.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion signature/converter/converter_tests/generated.go

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

2 changes: 1 addition & 1 deletion signature/generator/golang/generated.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by scale-signature v0.4.3, DO NOT EDIT.
// Code generated by scale-signature v0.4.4, DO NOT EDIT.
// output: types

package types
Expand Down
2 changes: 1 addition & 1 deletion signature/generator/rust/generated.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by scale-signature 0.4.3, DO NOT EDIT.
// Code generated by scale-signature 0.4.4, DO NOT EDIT.
// output: types

#![allow(dead_code)]
Expand Down
2 changes: 1 addition & 1 deletion signature/generator/typescript/generated.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by scale-signature 0.4.3, DO NOT EDIT.
// Code generated by scale-signature 0.4.4, DO NOT EDIT.
// output: types

import { Encoder, Decoder, Kind } from "@loopholelabs/polyglot"
Expand Down
16 changes: 12 additions & 4 deletions storage/signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
)

const (
defaultVersion = "v0.1.0"
SignatureDirectory = "signatures"
)

Expand Down Expand Up @@ -311,10 +312,13 @@ func GenerateSignature(sig *signature.Schema, name string, tag string, org strin
Signature: sig,

GolangPackageImportPath: "signature",
GolangPackageVersion: "v0.1.0",
GolangPackageVersion: defaultVersion,

RustPackageName: fmt.Sprintf("%s_%s_%s_guest", org, name, tag),
RustPackageVersion: "0.1.0",
RustPackageVersion: defaultVersion,

TypescriptPackageName: fmt.Sprintf("%s-%s-%s-guest", org, name, tag),
TypescriptPackageVersion: defaultVersion,
})
if err != nil {
return err
Expand All @@ -335,9 +339,13 @@ func GenerateSignature(sig *signature.Schema, name string, tag string, org strin
}

hostPackage, err := generator.GenerateHostLocal(&generator.Options{
Signature: sig,
Signature: sig,

GolangPackageImportPath: "signature",
GolangPackageVersion: "v0.1.0",
GolangPackageVersion: defaultVersion,

TypescriptPackageName: fmt.Sprintf("%s-%s-%s-host", org, name, tag),
TypescriptPackageVersion: defaultVersion,
})
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion version/current_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.4.3
v0.4.4

0 comments on commit 2a6eee6

Please sign in to comment.