-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace Goscale implementation with Gossamer #210
Comments
It's not possible to switch to the Gossamer scale codec, as the reflect implementation in Tinygo still lacks certain methods that are required by the codec: |
Instead of completely switching to Gossamer's SCALE types, we might consider an alternative approach. Summary of the tests we conducted (using a fork of Gossamer's SCALE implementation with the necessary modifications to support our
Switching to Gossamer's SCALE seems feasible, however, we will still need to maintain a fork of it with the necessary changes for supporting our Related issue: #308 |
Hello @radkomih! I was working on this project https://github.com/crypto2lab/scale-codec, it is a scale-codec implementation free of reflection and can be compiled to wasm. It already supports enums (VDT's), results, options, tuples and I am still working on structs. Basically you can have examples of usage here:
|
@EclesioMeloJunior thanks a lot for sharing this, I'll definitely check it. |
The current implementation does not support Go reflection, and type definitions are wrapped around Go primitive types, which makes development unpleasant. We propose spending some time trying to integrate Gossamer’s SCALE package since TinyGo has released a new version that includes better reflection support. Narrowing down the missing parts would be beneficial. A single implementation in Go will be more reliable and developer-friendly when it is maintained by both projects, and it will showcase the usage needs of both host and runtime environment.
The text was updated successfully, but these errors were encountered: