Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Can Mojo do "full" meta-programming at compile time, e.g., read a file or connect to a server, and include fetched data as constants in the compiled app?

You must be logged in to vote

Replies: 1 comment

Comment options

Related to this: if a feature like embed is added (see #2977), all this would be possible.

I mean, you wouldn't be opening sockets or reading files at compile time (I'm not sure that's a good idea for security reasons), but you could embed the files themselves in the executable.

You could, for example, have a build script that fetches the file, then compiles the Mojo code with the file embedded in it.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
💡
Ideas
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.