ton-society / grants-and-bounties

TON Foundation invites talent to imagine and realize projects that have the potential to integrate with the daily lives of users.
https://ton.org/grants
284 stars 129 forks source link

Haxe-Func : A Powerful Haxe Toolset for TON Smart Contract Development #770

Open kayx86 opened 2 weeks ago

kayx86 commented 2 weeks ago

Summary

Haxe-Func is a toolset built on Haxe that simplifies the development of smart contracts on the TON network. Leveraging Haxe’s mature ecosystem, including its static typing, advanced macro system, and comprehensive development tooling, Haxe-Func aims to provide a reliable and efficient development environment for smart contracts development on TON.

Context

Key features:

Benefits:

Target audience:

Goal:

Technical Approach:

Expected Result:

References

Currently there is no similar tool , this is the repo we are working on https://github.com/cocrafts/haxe-func

Estimate suggested reward

kayx86 commented 2 weeks ago

@delovoyhomie Please review it

anton-trunov commented 2 weeks ago

Some observations from my side:

@kayx86 You might want to add some more technical details here. How exactly are your going to use Haxe and the tools around it to produce the end result?

kayx86 commented 2 weeks ago

hi @anton-trunov

Thank you for your valuable feedback. You are correct in noting that haxe-func is inspired by the Tact project. However, the primary distinction lies in haxe-funcs utilization of Haxe a mature and powerful language with extensive development tooling. Specifically, haxe-func benefits from:

Mature Tooling : Haxe's robust IDE support, syntax highlighting, and advanced macro system. Complete Ecosystem: Integration with Haxe’s existing development tools such as LSP, which will enhance code completion and editor support. While the repository is still in its early stages, we have a complete boilerplate setup that allows for generating minimal foreign code (Func) through the command haxelib run reflaxe test, although it is stub for now, like you mentioned. The grant will significantly accelerate our development, enabling us to delve deeper into building out the project.

We will update the proposal to include a detailed documentation plan and specify how IDE and tooling support will be leveraged. The proposal will also outline how haxe-func’s capabilities, including its macro system and LSP integration, will facilitate efficient development and enhance the user experience.

Additionally, we will revise the "expected result" section to clearly show the successful implementation of a Jetton using haxe-func.

Thank you for helping us refine the proposal.

kayx86 commented 2 weeks ago

@anton-trunov @delovoyhomie I just update proposal , please review it

anton-trunov commented 2 weeks ago

The project will demonstrate the capabilities of haxe-func by successfully implementing a Jetton on the TON network. This will showcase the toolset’s effectiveness and validate its utility for smart contract development.

@kayx86 I would suggest you first provide an MVP that can be used to implement Jetton contracts and then it would be much easier to assess the merits of the project. Right now all you say is you are going to build on an existing Haxe infrastructure but it's not at all obvious to people (like myself) unfamiliar with Haxe, to understand how exactly you are going to do it.

I would suggest add a quick summary explaining what Haxe is and your step-by-step plan showing what you are going to do. Basically, I'm skeptical about using "compiler constructor" frameworks if that's that Haxe is. (I mean even parser generators are not really mature enough for what people usually want from programming language implementation). I'm happy to change my mind, though.

fluctlight-kayaba commented 1 week ago

@anton-trunov appreciate your skepticism, and I’d like to provide a more detailed explanation to address your concerns.

Haxe is a high-level, cross-platform language with a powerful type system and macro capabilities that make it a versatile tool for code generation and transpilation. It is not a “compiler constructor” framework in the traditional sense; rather, it is a fully-fledged language that can generate code for multiple target languages, such as JavaScript, C++, Python, and more.

The advantage of using Haxe for building a transpiler to FunC lies in its macro system and abstract syntax tree (AST) manipulation capabilities. This allows for the creation of a robust and flexible transpiler that can map Haxe’s high-level constructs to FunC’s low-level, blockchain-optimized constructs.

To give you more information to consider, I have continue and developed a basic transpiler that demonstrates the foundational concept and have prepared a demo video to showcase this. This initial implementation proves that the Haxe-to-FunC transpilation is not only possible but also promising.

Me and @kayx86 is super excited and will definitely move forward to fully implement the Jetton standard and other complex smart contracts on the TON network no matter we got the grant or not. Even though, I believe that with the support of the grant, we can take this project to the next level and provide a valuable tool for the TON community. I hope the demo video will help demonstrate the potential of this project, and I am happy to discuss further any questions or concerns you may have.

Thank you for considering the proposal, and I look forward to your feedback.

kayx86 commented 1 week ago

@delovoyhomie please review and feedback . Tks ser , i very happy if you approve and assigne me

anton-trunov commented 1 week ago

@kayx86 @fluctlight-kayaba I checked the AST traversal code in the linked repo and didn't see anything spectacular that would bring as a new working compiler with a few keystrokes. I'm sorry, but I think you are severely underestimating the effort that needs to be poured in to create a new programming language and an ecosystem around it.

My recommendation would be to not support this major undertaking via bounties. I can see two ways in which this could be supported: