Transpiler from haxe to nim (http://nim-lang.org/)
- High performance.
- Low memory footprint.
- Stable garbage collector, or maybe no GC at all (owned/unowned ref).
- Async IO: Files, TCP, UDP, HTTP, HTTPS, Websockets.
Backend, micro services, iot, calculations, haxe compiler :)
Because.
- Classes:
- inheritance
- constructors
- super call
- static and instance methods
- instance fields
- Interfaces
- Typedefs
- Anonymous
- Basic types:
- Int
- Float
- String
- Bool
- Generic Array
- IntMap, StringMap, ObjectMap
- Enums and ADT
- Abstracts and enum abstracts
- Generics
- GADTs
- Expressions:
- for
- while
- if
- switch
- Closures
- Externs
- Basic file reading by File.getContent
- haxe.Json
- Stdin output by trace
- Install lix packet manager https://github.com/lix-pm/lix.client
- Install nim compiler with https://github.com/dom96/choosenim
- Install craxecore library by "nimble install https://github.com/RapidFingers/Craxe?subdir=core"
- Create lix project
- Select haxe 4.0.0-rc3 compiler
- Add craxe library with lix from github https://github.com/RapidFingers/Craxe
- Add build.hxml with following strings:
-cp src
--macro craxe.Generator.generate()
--no-output
-lib craxe
-main Main
-D nim
-D nim-out=main.nim - Add some simple code to Main.hx
- Launch "haxe build.hxml"
It will generate code and will launch the nim compiler
"nim c -d:release filename.nim"
https://github.com/RapidFingers/CraxeExamples
- Switch expression
- Inheritance
- Interfaces
- BrainF**k benchmark
- Basic externs implementation
- Closures
- Typedefs
- Anonymous
- Abstracts
- Enum abstracts
- Generics
- GADT
- Map/Dictionary
- Method override
- Place all nim code to nimble library
- Extern for CraxeCore's http server
- Benchmark of async http server
- Possibility to add raw nim code
- Dynamic type
- haxe.Json
- Extern for native nim iterators
- Mysql database driver
- Craxe http server benchmark with json and mysql
- Dynamic method
- Try/Catch
- Reflection
- Auto import nimble libs
- Craxe console util for setup, create project, etc
- Type checking (operator is)
- Async/Await
- Some kind of std lib