WIP

This is a WIP. We expect the first alpha version to be available in january/2024.

Origami is a build system for C and C++. That will give you superpowers.

  • Easy to use

  • Fast

Features

  • Rich configuration language to meet all needs of your projects.

  • Plugin architecture for full extensibility.

  • Simplicity

  • Dependency management

  • Tests execution

Highlights

  1. Simplicity and Ease of Use:

    • Developers often appreciate tools that are easy to set up and use. A simple and user-friendly build system can reduce the learning curve, allowing developers to focus more on writing code and less on configuring and managing the build process.

    • Reduced complexity can lead to faster onboarding for new team members, which is especially crucial in dynamic project environments.

  2. Native Dependency Management Integration:

    • Native integration with dependency management streamlines the process of handling project dependencies. This can lead to fewer issues related to version mismatches, conflicts, and manual intervention during the build process.

    • Efficient dependency management can enhance the stability and reliability of builds, ensuring that projects are built on a consistent and reproducible basis.

  3. Extensible Plugin System:

    • An extensible plugin system encourages the development of custom tools and integrations tailored to specific project requirements. This flexibility allows developers to extend the functionality to suit their unique needs.

    • The plugin system fosters a collaborative ecosystem where the community can contribute and share plugins, promoting innovation and efficiency in the development process.

  4. Increased Productivity:

    • Simplifying the build process and providing a well-integrated system can lead to faster build times and quicker feedback loops. Developers can iterate more rapidly, leading to increased productivity.

    • The extensibility of the system allows teams to automate repetitive tasks and customize the build pipeline to optimize performance and resource usage.

  5. Cost Savings:

    • Streamlining the development process and reducing the time spent on troubleshooting build issues can result in significant cost savings. Time saved on manual interventions and debugging can be redirected towards feature development and bug fixing.

    • Improved productivity and faster development cycles may also contribute to faster time-to-market, potentially increasing revenue.

  6. Community Collaboration:

    • An open and extensible system can attract a community of developers who contribute plugins, share best practices, and collaborate on improving the overall build ecosystem. This collaboration can lead to a richer set of tools and integrations, benefiting everyone in the community.

  7. Consistency Across Environments:

    • Ensure consistency in builds across different development environments and platforms. This consistency is crucial for collaborative projects and can reduce deployment-related issues.

  8. Competitive Advantage:

    • Companies that adopt and contribute to an innovative and efficient build system like origami may gain a competitive advantage in terms of faster development cycles, higher-quality software, and the ability to adapt quickly to changing requirements.

Quick start

A origami build is driven by a configure file named: your-project.ori.ice.

It’s made of sections. The three required sections to start are project, tasks and plugins.

Every task will be defined inside it own subsection.

Tutorials

1: The hello world

Looks how simple and clean it is:

Simplest build

ICE-1.0.0
origami >= 0.0.1

@project {
	name: "galaxyguide"
	group: "com.universe"
	version: "0.0.1"
}

@tasks {
	@buildStep {
		ori->genExe(name: "galaxy", src: "main.cpp", compiler: "GCC")
	}
}

@plugins {
	GCC: ["com.codinamo.origami", "GCC", "1.0.0"]
}

And to execute your flow:

ori buildStep

You will compose the tasks into flows that will be called at command line.

Language reference

Sections

Sections are the main organization containers in your configuration.
The basic sections are:
  • @project

    • the basic identification of the project

  • @tags

    • Optional data like author, licence.

  • @flows

    • The flows that aggregate the tasks

  • @tasks

    • the tasks definition

  • @plugins

    • The plugins

  • @deps

    • List of dependencies

  • @rules

    • Boolean statements composition to reuse

Data types

The data types follows the json style
  • Integer

  • String

  • Double

  • Array

  • Object

  • Boolean

  • Null

Variables

The variables definition follows the json style
name: "galaxy"
count: 10
data: {first: 1, second: "str"}
Notice that there are no comma or colon between variable declarations. Only comma inside objetcs.

If

IFs follows C/C++ style
if(myVar) {
	ori->compile(...)
}

Boolean operations

Xor

^

And

&&

Or

||

Equals

==

Greater then

>

Lesser then

<

Greater or equals

>=

Lesser or equals

<=

Native functions

ori

ori→genExe() Generates a executable

ori→genLib() Generates a library

ori→compile() Compiles the code

ori→link()

os

os→run(cmd) Executes a command on the host machine

os→getName()

os→getArch()

os→getEnv()

os→getTime()

os→getTimezone()

io

io→readFile(path)

io→writeFile(path, content)

io→fileExists(path)

io→list(path, [regexpFilter])

io→dirExists(path)

io→createDir(path)

io→copy(fromPath, toPath, [regexpFilter]) copy file

io→copyAll(fromDirPath, toDirPath, [regexpFilter])

io→delete(path, [regexpFilter])

io→move(fromPath, toPath, [regexpFilter])

rex

rex→glob(regex)

crypto

crypto→uuid4()

crypto→randon()

crypto→md5()

crypto→sha1()

array

array→size(arr)

array→push(arr, element)

array→pop(arr, [count]) returns and removes last <count> elements, or 1 if count is not provided

array→shift(arr, [count]) returns and remove first <count> elements, or 1 if count is not provided

array→addFirst ??

array→slice ???

array→remove(arr, index)

array→contains(arr, element)

array→insert(arr, index, element)

array→count(arr, element)

array→indexOf(arr, element)

array→sort(arr)

array→shuffle(arr)

array→fill(arr, element, count)

array→reverse(arr)

array→isArray(arr)

array→revsort(arr)