Skip to content
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

[Documentation] Please add two entries to https://crystal-lang.org/reference/1.5/using_the_compiler/index.html - one for compiling multiple .cr files, and one for integrating shards #622

Open
rubyFeedback opened this issue Jul 8, 2022 · 1 comment

Comments

@rubyFeedback
Copy link

I finally started to learn crystal and have progressed to noob level 2, mostly.

I can compile my crystal code fine. \o/

However had right now I am compiling only single .cr files.

Could the official documentation add a paragraph that deals with
multiple .cr files? Do we have to specify them on the commandline?
What if these resides in other directories?

And, second to that, how to integrate code stored in shards, when we
want to compile something. Will the shards become a part of the resulting
binary?

This is probably easy to know for you guys, but as a newcomer it is not
yet clear to me, which is why i propose to add it to the official tutorial.
(I don't really want to check other resources, but admittedly I actually
learned the most so far from other blog entries that explain stuff.
Examples on the official homepage work fine though, I learn fastest
with working examples via the commandline actually.)

@Blacksmoke16
Copy link
Member

Blacksmoke16 commented Jul 8, 2022

This should prob be moved to https://github.com/crystal-lang/crystal-book.

But to answer your question, you should checkout https://crystal-lang.org/reference/1.5/syntax_and_semantics/requiring_files.html which covers essentially how to do both of these things.

@straight-shoota straight-shoota transferred this issue from crystal-lang/crystal Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants