RejectedSoftware Forums

Sign up

Create web server library from vibe.d

Hello All,

I am working on a little embedded project where I need a small web server that I can embed in my application. This is my first real project using the D language. How difficult would it be to build a library out of the vibe.d web server code? It looks like I just need the web server and the router module with dependencies?

Thanks,
-G

Re: Create web server library from vibe.d

On Sun, 23 Mar 2014 22:33:14 GMT, Gerry wrote:

Hello All,

I am working on a little embedded project where I need a small web server that I can embed in my application. This is my first real project using the D language. How difficult would it be to build a library out of the vibe.d web server code? It looks like I just need the web server and the router module with dependencies?

Thanks,
-G

The good news is that vibe.d is already a library with only two additional dependencies - libevent and OpenSSL. The latter can be disabled by stubbing out the code in source/vibe/stream/ssl.d and removing the "openssl": "~master" dependency from package.json/dub.json. I'll also add the possibility to use "versions": ["VibeNoSSL"] in the package description to disable it without modifying the code. All the additional code, such as the database drivers shouldn't have any impact (except for slightly increasing the executable size), so it can be left in while getting everything working.

However, how feasible the endeavor will be depends on the CPU architecture that is used. Something X86 based isn't a problem, but the only other architecture that currently has a chance of working AFAIK is ARM, but I didn't test it so far. If your platform is ARM based, you should try out the GDC ARM beta release.

Re: Create web server library from vibe.d

On Mon, 24 Mar 2014 06:36:54 GMT, Sönke Ludwig wrote:

On Sun, 23 Mar 2014 22:33:14 GMT, Gerry wrote:

Hello All,

The good news is that vibe.d is already a library with only two additional dependencies - libevent and OpenSSL. The latter can be disabled by stubbing out the code in source/vibe/stream/ssl.d and removing the "openssl": "~master" dependency from package.json/dub.json. I'll also add the possibility to use "versions": ["VibeNoSSL"] in the package description to disable it without modifying the code. All the additional code, such as the database drivers shouldn't have any impact (except for slightly increasing the executable size), so it can be left in while getting everything working.

However, how feasible the endeavor will be depends on the CPU architecture that is used. Something X86 based isn't a problem, but the only other architecture that currently has a chance of working AFAIK is ARM, but I didn't test it so far. If your platform is ARM based, you should try out the GDC ARM beta release.

Hi,

I have been looking at the code. This will work perfectly. Nice work! I really like the design. I'm working on an x86 based appliance now, but arm may be a future possibility. Thanks for the pointer.

Thanks,
-G