Using dub and rdmd together?

Timoses timosesu at gmail.com
Wed Jul 11 17:22:30 UTC 2018


On Wednesday, 11 July 2018 at 16:43:24 UTC, Seb wrote:
> I don't know of an easy way to do out of the box.
> However, with dmd's new -i option, it could be as easy as:
>
> ---
> dub fetch requests
> cat > test.d << EOF
> import std.stdio;
> import requests;
>
> void main() {
>     auto content = postContent("http://httpbin.org/post", 
> queryParams("name", "any name", "age", 42));
>     writeln(content);
> }
> EOF
> dub fetch requests
> dmd -I~/.dub/packages/requests-0.8.2/requests/source -i -run 
> tests.d
> ---
>
> However, dmd itself doesn't do any caching (though it would 
> work similarly with rdmd).
> But, of course, this won't work for more complex dub packages.
> There's `dub describe` (and a backend generator) for which they 
> might be used.

So this is kind of similar to what dub does already?
Would be nice if dub could cache such compiled scripts somewhere. 
I mean dub already caches inside .dub folder in a dub project. 
Why not also cache compiled scripts somewhere?


More information about the Digitalmars-d-learn mailing list