Convert Javascript/TypeScript to C

Overview

JavaScript/TypeScript to C transpiler

Produces readable C89 code from JS/TS code.

For example, this JavaScript:

console.log("Hello world!");

transpiles to the following C code:

#include <stdio.h>

int main() {
    printf("Hello world!\n");
    return 0;
}

No excessive code that is not actually needed is ever generated.

The output is as readable as possible and mostly maps well to the original code.

Another example:

var obj = { key: "hello" };
obj["newKey"] = "test";
console.log(obj);

transpiles to the following C code:

newKey = "test"; printf("{ "); printf("key: \"%s\"", obj->key); printf(", "); printf("newKey: \"%s\"", obj->newKey); printf(" }\n"); free(obj); return 0; } ">
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>

struct obj_t {
    const char * key;
    const char * newKey;
};

static struct obj_t * obj;
int main(void) {

    obj = malloc(sizeof(*obj));
    assert(obj != NULL);
    obj->key = "hello";
    obj->newKey = "test";

    printf("{ ");
    printf("key: \"%s\"", obj->key);
    printf(", ");
    printf("newKey: \"%s\"", obj->newKey);
    printf(" }\n");

    free(obj);

    return 0;
}

Project status

Work in progress: it works, but only about 70% of ES3 specification is currently supported: statements and expressions - 95%, built-in objects - 17%.

Notable NOT supported features include, for example: float and big numbers (all numbers are int16_t currently), eval, Date, Math, etc.

Detailed information about supported and planned features can be found in COVERAGE.md.

Contributions are welcome! See src/README.md

Live demo

You can try it out yourself online:

Rationale

The main motivation behind this project was to solve problem that IoT and wearables cannot be currently efficiently programmed with JavaScript.

The thing is, for sustainable IoT devices that can work for a long time on single battery, things like Raspberry Pi won't do. You'll have to use low-power microcontrollers, which usually have very little memory available.

RAM ranges literally from 512 bytes to 120KB, and ROM/Flash from 1KB to 4MB. In such conditions, even optimized JS interpreters like JerryScript, Espruino or V7 are sometimes too much of an overhead and usually lead to the increased battery drain and/or don't leave a lot of system resources to your program.

Of course, transpiler cannot map 100% of the JavaScript language and some things are have to be left out, notably eval. Still, current conclusion is, that it is possible to transpile most of the language.

Targets

Planned transpilation targets:

Usage

Command line:

npm install -g ts2c

Syntax:

ts2c <files to transpile>

Node.js:

npm install ts2c
const ts2c = require("ts2c");
const cCode = ts2c.transpile("console.log('Hello world!')");
console.log(cCode);

In browser:

">
<script src="https://unpkg.com/typescript">script>
<script src="ts2c.bundle.js">script>
<script>
    var cCode = ts2c.transpile("console.log('Hello world!')");
    alert(cCode);
script>
Comments
  • Please include the original code as a comment in the transpiled code

    Please include the original code as a comment in the transpiled code

    To aid in debugging please include the original TS code in the generated C code so you can see where you are in the original source when you are debugging. To use the example in the README:

    var obj = { key: "hello" };
    obj["newKey"] = "test";
    console.log(obj);
    

    the generated code might look something like this:

    #include <stdlib.h>
    #include <assert.h>
    #include <stdio.h>
    
    struct obj_t {
        const char * key;
        const char * newKey;
    };
    
    static struct obj_t * obj;
    int main(void) {
        // Example.ts, Line 1: var obj = { key: "hello" };
        obj = malloc(sizeof(*obj));
        assert(obj != NULL);
        obj->key = "hello";
    
        // Example.ts, Line 2: obj["newKey"] = "test";
        obj->newKey = "test";
    
        // Example.ts, Line 3: console.log(obj);
        printf("{ ");
        printf("key: \"%s\"", obj->key);
        printf(", ");
        printf("newKey: \"%s\"", obj->newKey);
        printf(" }\n");
    
        free(obj);
    
        return 0;
    }
    
    opened by jockm 12
  • type alias

    type alias

    type st=string;
    var s: st = "Hello world!";
    console.log(s);
    
    #include <stdio.h>
    static const char * s;
    int main(void) {
        /* Unsupported node: type st=string; */;
        s = "Hello world!";
        printf("%s\n", s);
    
        return 0;
    }
    
    opened by zaoqi 7
  • Finishing ES3 features once and for all

    Finishing ES3 features once and for all

    We are really, really close to finishing all ES3 features. I'd love to implement all of these, but I'm a bit busy right now...

    • with - nobody really uses it, it's best to just leave it out right now
    • instanceof - sadly, I don't think we'll be able to implement this, seeing as we're in C...
    • Infinity - could be defined as 1.0 / 0.0. In C99, INFINITY is defined in math.h. however, due to the nature of C, numbers overflow instead of stopping at Infinity, so maybe this won't be implemented :/
    • parseFloat - could use atof
    • decodeURI*, encodeURI* - can use this and this
    • *.toLocaleString - no way!
    • Object.toString - can convert object to JSON
    • Object.hasOwnProperty - doesn't seem possible sadly... but it wouldn't matter anyways because of the way objects are implemented
    • String.to*Case could use toupper() and tolower().
    • The Math object can just wrap around math.h.

    Dates will take a lot of work; let's not touch it for now.

    Regexes. Oh boy. We could use something like SLRE which seems pretty promising and light.

    As for functions, I think we should completely redesign the way we define & call them in order to have .call(), .apply(), and arguments. The first parameter of every function will be their own this object. When calling a function, then, if it's not .call()ed, then we just pass either a global this (like window in the browser or global on node) or the parent object of the function. For example, a.b.c() -> a.b.c(a.b), but foo() -> foo(GLOBAL_THIS). The second parameter would be an array of arguments, simply called arguments. Then, we parse the JS function parameters and define variables corresponding to each argument in the array.

    So, function foo(a, b, c) { ... } would turn into... (pseudocode)

    void foo(object this, array arguments) {
        type a = arguments[0];
        type b = arguments[1];
        type c = arguments[2];
        ...
    }
    

    Then, we can implement global this by creating an object called GLOBAL_THIS and every global variable defined will be put into that object.

    Also, I might make a PR soon to change int16_t to size_t, so all processors are happy.

    opened by sudo-carson 6
  • Three dots in an object in TypeScript

    Three dots in an object in TypeScript

    regex.ts:101, current revision (05d3ffe).

    The line

    tokens.push({ anyOf: true, tokens: [NOTHING, { ...last, oneOrMore: true }] });
    

    leads to this JS code:

    while (i < template.length) {
        var last = lastToken();
        if (template[i] == '^' && tokens.length == 0)
            tokens.push(FIXED_START);
        else if (template[i] == '$' && i == template.length - 1 || template.slice(i, i + 2) == '$)' || template.slice(i, i + 2) == '$|')
            tokens.push(FIXED_END);
        else if (template[i] == '\\')
            i++, tokens.push({ anyOf: true, tokens: this.parseEscaped(template[i]) });
        else if (template[i] == '.')
            tokens.push({ anyCharExcept: true, tokens: [] });
        else if (template[i] == '*') {
            tokens.pop();
            if (typeof last === "string")
                tokens.push({ anyOf: true, tokens: [NOTHING, { tokens: [last], oneOrMore: true }] });
            else
                tokens.push({ anyOf: true, tokens: [NOTHING, {}].concat(last, [oneOrMore, true]) });
        }
        ;
    }
    if (template[i] == '?')
        tokens.push({ anyOf: true, tokens: [NOTHING, tokens.pop()] });
    else if (template[i] == '+')
    

    So, the while loop ends unexpectedly.

    Did you mean something like

    tokens.push({ anyOf: true, tokens: [NOTHING, { tokens: last, oneOrMore: true }] });
    

    ?


    node v6.10.3 npm v3.10.10 tsc 2.3.3

    opened by georgy7 5
  • Using C++ instead of C?

    Using C++ instead of C?

    As I've been browsing the repository, I've been wondering why this is using C instead of C++. By using C++, we could use all of the features of C with the addition of classes, which would make several JS/TS features easier to implement. What's the reasoning behind using C?

    opened by 2pichar 4
  • Nice project

    Nice project

    This is a cool idea... I'd love to see a fully working ts2c compiler.

    Have you had a look at Haxe at all? The Haxe compiler can compile Haxe code to pretty stable C code and works well. The syntax for Haxe is somewhat similar to TypeScript too as they are both descended from Javascript.and use similar types and type annotations. I imagine it could be modified to work with Typescript a lot more easily than starting from scratch.

    opened by darrylryan 4
  • ts2c/src/types.js:625

    ts2c/src/types.js:625

    https://gitlab.com/the-language/the-language/blob/dab7bd014e15d4f06e09fae039679a96a34945e9/core/pure/typescript/lang.ts

    $ ts2c lang.ts
    /home/zaoqi/.config/yarn/global/node_modules/ts2c/src/types.js:625
                var propType = this.convertType(propTsType, declaration.name) || exports.PointerVarType;
                                                                        ^
    
    TypeError: Cannot read property 'name' of undefined
        at TypeHelper.generateStructure (/home/zaoqi/.config/yarn/global/node_modules/ts2c/src/types.js:625:69)
        at TypeHelper.convertType (/home/zaoqi/.config/yarn/global/node_modules/ts2c/src/types.js:608:35)
        at TypeHelper.getCType (/home/zaoqi/.config/yarn/global/node_modules/ts2c/src/types.js:257:39)
        at /home/zaoqi/.config/yarn/global/node_modules/ts2c/src/types.js:526:80
        at Array.forEach (<anonymous>)
        at TypeHelper.resolveTypes (/home/zaoqi/.config/yarn/global/node_modules/ts2c/src/types.js:526:23)
        at TypeHelper.inferTypes (/home/zaoqi/.config/yarn/global/node_modules/ts2c/src/types.js:522:14)
        at newConstructor.CProgram (/home/zaoqi/.config/yarn/global/node_modules/ts2c/src/program.js:146:25)
        at new newConstructor (/home/zaoqi/.config/yarn/global/node_modules/ts2c/src/template.js:26:35)
        at Object.<anonymous> (/home/zaoqi/.config/yarn/global/node_modules/ts2c/bin/ts2c:14:14)
    $ yarn global list
    yarn global v1.15.2
    warning package.json: No license field
    info "[email protected]" has binaries:
       - gulp
    info "[email protected]" has binaries:
       - hexo
    info "[email protected]" has binaries:
       - ts2c
    Done in 0.65s.
    
    opened by zaoqi 3
  • Export in main

    Export in main

    This is a work in progress for #9 that can be built on.

    • A new, simplified main file to export the transpile function (for both node and browser)
    • Usage of browserify's -s ts2c to handle the export
    • Update of package.json main field to point to the new file

    The "old" main file is still included, as I didn't manage to fix the tests when pointing to the new one. (They don't run on Windows, so it was a pain to try.)

    opened by Hirse 3
  • Compiling TypeScript to C via WebAssembly

    Compiling TypeScript to C via WebAssembly

    I found two compilers that could be used to convert TypeScript to C:

    Would it be feasible to compile TypeScript programs to WebAssembly using AssemblyScript, and then de-compile them to C using Wasmdec?

    opened by jarble 2
  • Function type / global function as value

    Function type / global function as value

    var exports={}
    function id(x){
      return x
    }
    exports.id=id
    exports.k=0
    console.log(id(exports.k))
    console.log(exports.id("k"))
    console.log(exports.id(-1))
    
    #include <stdlib.h>
    #include <assert.h>
    #include <stdio.h>
    typedef int int16_t;
    
    struct struct_0_t {
        int16_t id;
        int16_t k;
    };
    
    static struct struct_0_t * exports;
    int16_t id(int16_t x)
    {
        return x;
    
    }
    
    int main(void) {
        exports = malloc(sizeof(*exports));
        assert(exports != NULL);
        exports->id = id;
        exports->k = 0;
        printf("%d\n", id(exports->k));
        printf(/* Unsupported printf expression */);
        printf(/* Unsupported printf expression */);
        free(exports);
    
        return 0;
    }
    
    opened by zaoqi 2
  • Support for throw/catch/errors

    Support for throw/catch/errors

    First: Amazing project would like to contribute in any way possible.

    Now onto the real issue, why the support for runtime errors(throw, catch, and the Error constructor) isn't planned on being supported?

    opened by lucat1 2
  • Bump shell-quote from 1.6.1 to 1.7.3

    Bump shell-quote from 1.6.1 to 1.7.3

    Bumps shell-quote from 1.6.1 to 1.7.3.

    Release notes

    Sourced from shell-quote's releases.

    v1.7.2

    • Fix a regression introduced in 1.6.3. This reverts the Windows path quoting fix. (144e1c2)

    v1.7.1

    • Fix $ being removed when not part of an environment variable name. (@​Adman in #32)

    v1.7.0

    • Add support for parsing >> and >& redirection operators. (@​forivall in #16)
    • Add support for parsing <( process substitution operator. (@​cuonglm in #15)

    v1.6.3

    • Fix Windows path quoting problems. (@​dy in #34)

    v1.6.2

    • Remove dependencies in favour of native methods. (@​zertosh in #21)
    Changelog

    Sourced from shell-quote's changelog.

    1.7.3

    • Fix a security issue where the regex for windows drive letters allowed some shell meta-characters to escape the quoting rules. (CVE-2021-42740)

    1.7.2

    • Fix a regression introduced in 1.6.3. This reverts the Windows path quoting fix. (144e1c2)

    1.7.1

    • Fix $ being removed when not part of an environment variable name. (@​Adman in #32)

    1.7.0

    • Add support for parsing >> and >& redirection operators. (@​forivall in #16)
    • Add support for parsing <( process substitution operator. (@​cuonglm in #15)

    1.6.3

    • Fix Windows path quoting problems. (@​dy in #34)

    1.6.2

    • Remove dependencies in favour of native methods. (@​zertosh in #21)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump minimist from 1.2.5 to 1.2.6

    Bump minimist from 1.2.5 to 1.2.6

    Bumps minimist from 1.2.5 to 1.2.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • npm - Unexpected end of JSON

    npm - Unexpected end of JSON

    Log generated after running npm install -g ts2c

    0 info it worked if it ends with ok
    1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', '-g', 'ts2c' ]
    2 info using [email protected]
    3 info using [email protected]
    4 verbose npm-session 7cb493a22849cfa3
    5 silly install loadCurrentTree
    6 silly install readGlobalPackageData
    7 http fetch GET 200 https://registry.npmjs.org/ts2c 16ms (from cache)
    8 silly pacote tag manifest for [email protected] fetched in 26ms
    9 timing stage:loadCurrentTree Completed in 41ms
    10 silly install loadIdealTree
    11 silly install cloneCurrentTreeToIdealTree
    12 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
    13 silly install loadShrinkwrap
    14 timing stage:loadIdealTree:loadShrinkwrap Completed in 2ms
    15 silly install loadAllDepsIntoIdealTree
    16 silly resolveWithNewModule [email protected] checking installable status
    17 http fetch GET 200 https://registry.npmjs.org/typescript 12ms (from cache)
    18 silly fetchPackageMetaData error for [email protected] Unexpected end of JSON input while parsing near '..."latest","merge2":"la'
    19 timing stage:rollbackFailedOptional Completed in 0ms
    20 timing stage:runTopLevelLifecycles Completed in 74ms
    21 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '..."latest","merge2":"la'
    21 verbose stack     at JSON.parse (<anonymous>)
    21 verbose stack     at parseJson (/usr/lib/nodejs/json-parse-better-errors/index.js:7:17)
    21 verbose stack     at consumeBody.call.then.buffer (/usr/share/npm/node_modules/node-fetch-npm/src/body.js:96:50)
    21 verbose stack     at process._tickCallback (internal/process/next_tick.js:68:7)
    22 verbose cwd /home/john/Desktop/Software/Garter/FebC
    23 verbose Linux 5.4.0-65-generic
    24 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "ts2c"
    25 verbose node v10.19.0
    26 verbose npm  v6.14.4
    27 error Unexpected end of JSON input while parsing near '..."latest","merge2":"la'
    28 verbose exit [ 1, true ]
    
    opened by JohnAlexCO 0
  • Bump cached-path-relative from 1.0.2 to 1.1.0

    Bump cached-path-relative from 1.0.2 to 1.1.0

    Bumps cached-path-relative from 1.0.2 to 1.1.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Incorrect generation of 'free' call

    Incorrect generation of 'free' call

    I changed the example of #74 from this

    function return_from_obj(){
      let obj = {key:1};
      return obj.key;
    }
    
    console.log(return_from_obj());
    

    to

    let temp;
    
    function return_from_obj(){
      let obj = {key:1};
      temp = obj;
      return obj.key;
    }
    
    console.log(return_from_obj());
    

    and the corresponding output C code is

    #include <stdlib.h>
    #include <assert.h>
    #include <stdio.h>
    typedef short int16_t;
    
    struct temp_t {
        int16_t key;
    };
    
    static struct temp_t * temp;
    int16_t return_from_obj()
    {
        struct temp_t * obj;
        obj = malloc(sizeof(*obj));
        assert(obj != NULL);
        obj->key = 1;
        temp = obj;
        return obj->key;
    
    }
    
    int main(void) {
        printf("%d\n", return_from_obj());
        free(obj);
    
        return 0;
    }
    

    This C code has an error in free(obj), which should be free(temp). It appears the original variable name (obj in this case) is used to free the memory, even though the memory is referenced by another variable at that point.

    I used the live demo for this test.

    bug 
    opened by brunexgeek 0
  • Order in which properties are added is not honored

    Order in which properties are added is not honored

    Using the README.md example as starting point:

    var obj = { key: "hello" };
    obj["newKey"] = "test";
    console.log(obj);
    

    If we add the newKey property after the console.log, it should not appear in the output.

    var obj = { key: "hello" };
    console.log(obj);
    obj["newKey"] = "test";
    

    However, ts2c include all properties in the C definition (not the actual problem) and take them all into account when the object is used. This change the program semantic.

    The C program output for this case is

    { key: "hello", newKey: "(null)" }
    

    but should be

    { key: "hello" }
    

    since newKey do not exists when console.log is called. Just for comparison, this would not happen if the internal representation for objects were actually a dictionary (possibly with some performance penalties).

    opened by brunexgeek 0
Owner
Andrei Markeev
Full-Stack Software Engineer
Andrei Markeev
StarkScript - or the Stark programming language - is a compiled C-based programming language that aims to offer the same usability as that of JavaScript's and TypeScript's

StarkScript StarkScript - or the Stark programming language - is a compiled C-based programming language that aims to offer the same usability as that

EnderCommunity 5 May 10, 2022
A demo app using: Svelte, Typescript, Vite, and Emscripten

Svelte + TS + Vite + Emscripten This template should help get you started developing with Svelte, TypeScript, and Emscripten in Vite. This template wa

Wolf McNally 3 Nov 15, 2021
TypeScriptCompiler - TypeScript Compiler (by LLVM)

TypeScript Native Compiler Powered by Build Demo Chat Room Want to chat with other members of the TypeScriptCompiler community? Example abstract class

Alex D 282 Nov 18, 2022
Convert LLVM coverage information into HTML reports

llvm-coverage-to-html converter The clang compiler supports source based coverage tracking, but the default reporting options are very basic. This too

Thomas Neumann 2 Oct 11, 2021
POC tool to convert CobaltStrike BOF files to raw shellcode

BOF2Shellcode POC tool to convert a Cobalt Strike BOF into raw shellcode. Introduction This code was written as part of a blog tutorial on how to conv

FalconForce 129 Nov 15, 2022
cbmconvert: create, extract and convert 8-bit Commodore binary archives

cbmconvert: create, extract and convert 8-bit Commodore binary archives cbmconvert extracts files from most known archive file formats that are used o

Marko Mäkelä 6 Feb 5, 2022
Resize, crop, and convert images on Upload.

Upload Image Plugin Resize, crop, and convert images on Upload. To use this plugin use the following settings in a "Transformation Step" in the Upload

Upload.js 20 Mar 31, 2022
iconv implementation using Win32 API to convert.

win_iconv is a iconv implementation using Win32 API to convert. win_iconv is placed in the public domain. ENVIRONMENT VARIABLE: WINICONV_LIBICON

null 164 Nov 12, 2022
Small program using GMP to convert a decimal number (1.8) into a reduced fraction (9/5)

gmp_rationalize This is a small program to convert a decimal number (like 1.8) into a reduced fraction (like 9/5), using GMP for handling arbitrary-pr

null 3 Apr 5, 2022
pluggable tool to convert an unrolled TritonAST to LLVM-IR, optimize it and get back to TritonAST

it is fork from https://github.com/fvrmatteo/TritonASTLLVMIRTranslator *WARNINGS: tested only linux(ubuntu 20.04) and only llvm and clang version 10*

pr4gasm 5 Jun 10, 2022
A tool to convert Call of Duty XBIN/EXPORT files to and from each other.

exportxbin exportxbin is an enhanced version of export2bin included in the Call of Duty: Black Ops III Mod Tools. Its main goal is to provide users wi

Philip 3 Jan 22, 2022
Tiny project to convert a .ase to a RGBA Byte array

Tiny project to convert a .ase to a RGBA Byte array

Stephen Ma 3 Apr 6, 2021
OpenScan is an open-source document scanner app that enables users to scan hard copies of documents or notes and convert it into a PDF file. No ads. No data collection. We respect your privacy.

OpenScan An open source app that enables users to scan hardcopies of documents or notes and convert it to a PDF file. No ads. No data collection. We r

Ethereal Developers Inc 1.2k Nov 20, 2022
Convert OSGB,Shp,GDB To Cesium 3DTiles

About Project 整体参考https://github.com/fanvanzh/3dtiles, 向作者致敬,市面上唯一的开源好用的3DTILES转换工具,在学习过程中,从中收获很多,对3DTiles、OSGB、GLTF等数据格式有了进一步了解。 原工程基于C++、C和Rust,本人本身

HuiWang 108 Nov 25, 2022
⚔️ A tool for cross compiling shaders. Convert between GLSL, HLSL, Metal Shader Language, or older versions of GLSL.

A cross compiler for shader languages. Convert between SPIR-V, GLSL / GLSL ES, HLSL, Metal Shader Language, or older versions of a given language. Cross Shader wraps glslang and SPIRV-Cross, exposing a simpler interface to transpile shaders.

Alain Galvan 179 Nov 18, 2022
Tool to convert ELF (S)hared (O)bject to Nintendo (R)elocatable (S)hared (O)bject

elf2rso Tool to convert ELF (S)hared (O)bject to Nintendo (R)elocatable (S)hared (O)bject Command Line Options -i or --input - It's the ELF File to be

Wesley Moret 7 Mar 13, 2022
Convert ATARI ATR files to CAR (SWITCHABLE XEGS CARTRIDGE)

ATR2CAR Convert ATARI ATR files to CAR (SWITCHABLE XEGS CARTRIDGE) Konwerter uruchamiamy z wiersza poleceń: atr2car File.atr File.car [-c] [-128|-256|

null 4 Apr 26, 2022
An efficient tool written in C to convert base numbers dumps into human readable string and vice versa.

strtools A tool written in C to convert number bases to human readable string and vice versa. Usage Compile make Help strtools -h Output: Usage: strt

Mikey 5 Jun 28, 2022
Elk is a tiny embeddable JavaScript engine that implements a small but usable subset of ES6

Elk is a tiny embeddable JavaScript engine that implements a small but usable subset of ES6. It is designed for microcontroller development. Instead of writing firmware code in C/C++, Elk allows to develop in JavaScript. Another use case is providing customers with a secure, protected scripting environment for product customisation.

Cesanta Software 1.4k Nov 25, 2022