Skip to content

Support a way to embed resources into code and use as a streams #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
antanas-arvasevicius opened this issue Oct 10, 2018 · 2 comments
Closed

Comments

@antanas-arvasevicius
Copy link

Hi,
We are struggling to find a way how to include some html templates in our multiplatform project (JVM, iOS, JS) and it looks like there is no way how to do this.
I'd remembered from Flash Player that there was something called Assets Embedding, which uses annotation:

        [Embed(source="sound1.mp3")] 
        public var soundCls:Class; 

Maybe kotlinx.io could have some annotation:

@Embed(resource="...")
val bytes:BufferedInputStream;

which automatically embeds resource files into application during compilation.
Now it's hard to include some small binary files into project as now we need to bundle files into packages for each platform and deploy separately executables + assets and implement some ResourcesManager for each platform manually.

@9468305
Copy link

9468305 commented May 26, 2019

Maybe you can try kotlinx.html with DSLMarker.

Mark resources as annotation, embed resource files into klib, which just like jar file's structures.

@fzhinkin
Copy link
Collaborator

We're rebooting the kotlinx-io development (see #131), all issues related to the previous versions will be closed. Consider reopening it if the issue remains (or the feature is still missing) in a new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants