All Projects → kondrak → codespawn

kondrak / codespawn

Licence: MIT license
Code generator written in Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to codespawn

enumer
A Go tool to auto generate methods for your enums
Stars: ✭ 167 (+391.18%)
Mutual labels:  codegenerator, code-generation, codegeneration
Kodgen
C++17 parser and code generator
Stars: ✭ 19 (-44.12%)
Mutual labels:  codegenerator, code-generation, codegeneration
CodegenCS
C# Toolkit for Code Generation (T4 alternative!)
Stars: ✭ 119 (+250%)
Mutual labels:  codegenerator, codegeneration
tapiGen2
PL/SQL Table API code Generator
Stars: ✭ 22 (-35.29%)
Mutual labels:  codegenerator
damascus
⚔️ CRUD boilerplate generator for Liferay DXP
Stars: ✭ 51 (+50%)
Mutual labels:  codegenerator
CodeGen
Unity Code Generator
Stars: ✭ 31 (-8.82%)
Mutual labels:  codegenerator
sisyphus-js
Sisyphus customized protobuf and gRPC runtime and code generator for JavaScript/TypeScript
Stars: ✭ 19 (-44.12%)
Mutual labels:  code-generation
graphql-ts-client
Typescript DSL for GraphQL.
Stars: ✭ 124 (+264.71%)
Mutual labels:  codegenerator
go-recipes
🦩 Tools for Go projects
Stars: ✭ 2,490 (+7223.53%)
Mutual labels:  code-generation
smartstruct
Dart Code Generator for generating mapper classes
Stars: ✭ 20 (-41.18%)
Mutual labels:  codegenerator
picocog
A tiny code generation library (< 8 KB) written in Java, useful for any purpose, but ideal for JSR-269
Stars: ✭ 82 (+141.18%)
Mutual labels:  codegeneration
seezoon-framework-all
Seezoon快速开发平台基于spring mybatis shiro jquery 完全的前后端分离的后台管理系统,采用最简单技术,实现快速开发.
Stars: ✭ 47 (+38.24%)
Mutual labels:  codegenerator
php-test-generator
Generate test cases for existing PHP files
Stars: ✭ 47 (+38.24%)
Mutual labels:  codegenerator
modelina
Library for generating data models based on inputs such as AsyncAPI, OpenAPI, or JSON Schema documents.
Stars: ✭ 55 (+61.76%)
Mutual labels:  codegenerator
opsli-ui
OPSLI 快速开发平台基于springboot、vue、element-ui ,项目采用前后端分离架构,热插拔式业务模块与插件扩展性高 ,代码简洁,功能丰富,开箱即用
Stars: ✭ 76 (+123.53%)
Mutual labels:  codegenerator
opensbli
A framework for the automated derivation and parallel execution of finite difference solvers on a range of computer architectures.
Stars: ✭ 56 (+64.71%)
Mutual labels:  code-generation
proto2gql
The project has been migrated to https://github.com/EGT-Ukraine/go2gql.
Stars: ✭ 21 (-38.24%)
Mutual labels:  codegenerator
hwt
VHDL/Verilog/SystemC code generator, simulator API written in python/c++
Stars: ✭ 145 (+326.47%)
Mutual labels:  codegenerator
pony-capnp
Cap’n Proto plugin for generating serializable Pony classes. 🐴 - 🎩'n 🅿️
Stars: ✭ 19 (-44.12%)
Mutual labels:  code-generation
Smart-Net-Data-Accessor
2-way/outside SQL build-time data accessor generator library.
Stars: ✭ 22 (-35.29%)
Mutual labels:  codegenerator

Codespawn

Crates.io Documentation Build Status Coverage Status

Codespawn is a basic C++ and Rust code generator. Desired API can be defined using either JSON or XML and the crate supports both reading from a file or a string. Currently it's possible to generate enums, structs, functions, function pointers, variables and bitflags with all applicable attributes and properties.

This crate was created as a helper tool for ProDBG. See example XML for instructions on how to construct the API definition.

Documentation

Usage

# Cargo.toml
[dependencies]
codespawn = "0.3"

Example

extern crate codespawn;

fn main()
{
    // generate from XML definition
    let raw_code = codespawn::from_xml("examples/sample.xml").unwrap();
    // generate from JSON definition
    //let raw_code = codespawn::from_json("examples/sample.json").unwrap();

    // generate code, store as String
    let cpp_code  = raw_code.to_cpp().unwrap().to_string();
    let rust_code = raw_code.to_rust().unwrap().to_string();

    // generate and save directly to file
    raw_code.to_cpp().unwrap().to_file("sample.cpp");
    raw_code.to_rust().unwrap().to_file("sample.rs");
}

Build instructions

cargo build
cargo run --example xml
cargo run --example json

This will run the example which will generate code and save it to files using sample XML definition.

License

Licensed under either of

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].