holochain / hdk-assemblyscript

The Holochain Developer Kit for Assemblyscript
41 stars 2 forks source link

Implement some kind of decorator pattern for some functions similar to hdk-rust macros #2

Closed Connoropolous closed 5 years ago

MaxGraey commented 5 years ago

You could do some early code generation (example for decorators) by using --transform arg via cli or afterParse method via code. See for details

The same approach using in ewasm for ABI auto-generation

Connoropolous commented 5 years ago

I'll look into those, thanks!!

Connoropolous commented 5 years ago

@MaxGraey What is the reason for the fork of assemblyscript?

https://github.com/AssemblyScript/assemblyscript/compare/master...lrettig:ewasm

Just to get a couple extra exports that you use here? https://github.com/etherts/ewasm-as/blob/master/assembly/src/transform.js#L14-L21

MaxGraey commented 5 years ago

Yeah, only for extra exports of AST entities, so if you need making some extra public entities you could also fork AS and making PR to main repo after you stabilize things which you required

Connoropolous commented 5 years ago

Cool, yes. Just got a PR in this repo open with exactly the approach you made mention of. I don't want to make any assumptions about your available time @MaxGraey, but it could be very valuable to have an experienced set of eyes give it a quick look over. Very appreciative of your comments so far.

MaxGraey commented 5 years ago

Sure, I will keep my eyes on your PR