How to share a Duktape app?


#1

Hey, guys!
So, I’ve written some JavaScript program to be run in Duktape, mostly reusing the code from my compiler web-app. However, it can’t be run in Duktape in its default configuration, it has to be run with a customized C stub (some 250 lines of code) that will configure Duktape first. So, how would you recommend me to share it on my website?
You can see how I tried it here:
http://flatassembler.000webhostapp.com/Duktape.zip
Hosting the Duktape source code on your website without permission isn’t illegal, right? It’s under the MIT license.
To my best knowledge, it can’t damage any software or (much less likely) hardware, but, let’s face it, we are talking about a program that outputs assembly and that hasn’t been tested or even reviewed by an expert. Warning about the potential dangers in the ReadMe is enough, right?


#2

Good day!

Duktape C will not run on 000webhost free plans. We offer only PHP hosting.

You will need to buy and configure a VPS: www.hostinger.com/vps-hosting

Hosting the Duktape source code on your website without permission isn’t illegal, right? It’s under the MIT license.

It’s not illegal :slight_smile:


#3

Really? I’ve always thought that, if you manage to write your program in C99 (which is so hard that it’s almost never worth the effort), it will basically run on every single platform except perhaps i8086. Is transpiling C and JavaScript to PHP possible, just like transpiling C and many other languages to JavaScript is? If there is a C to PHP transpiler good enough to transpile Duktape to PHP, I won’t even need a JavaScript to PHP transpiler, since Duktape enables me to run JavaScript on any platform with a decent C compiler.
I have over 2000 lines of code, rewriting it all in a language I don’t know right now, such as PHP, will take a tremendous amount of time. :frowning:

Regardless, my question was not how to run that program on the server (though it may be useful), my question was how to make it relatively easy for people to install that Duktape app onto their computers. I mustn’t host any executable files, I mustn’t host even a bash script that will compile them automatically if a compatible C compiler is installed…


#4

Is transpiling C and JavaScript to PHP possible, just like transpiling C and many other languages to JavaScript is?

I honestly can’t answer on this behalf. It’s not on my field of knowledge.

Regardless, my question was not how to run that program on the server (though it may be useful), my question was how to make it relatively easy for people to install that Duktape app onto their computers. I mustn’t host any executable files, I mustn’t host even a bash script that will compile them automatically if a compatible C compiler is installed…

I think you could compile the code, archive the resulted binaries, then upload the archived content on 000webhost.


#5

OK, thanks! I thought hosting archived executable files is also a violation of the Terms of Service.


#6

We’re happy the issue has been solved :slight_smile:


#7