{"action":"created","issue":{"url":"https://api.github.com/repos/premake/premake-core/issues/276","labels_url":"https://api.github.com/repos/premake/premake-core/issues/276/labels{/name}","comments_url":"https://api.github.com/repos/premake/premake-core/issues/276/comments","events_url":"https://api.github.com/repos/premake/premake-core/issues/276/events","html_url":"https://github.com/premake/premake-core/pull/276","id":106818100,"number":276,"title":"Embed precompiled lua files, instead of source.","user":{"login":"tvandijck","id":451515,"avatar_url":"https://avatars.githubusercontent.com/u/451515?v=3","gravatar_id":"","url":"https://api.github.com/users/tvandijck","html_url":"https://github.com/tvandijck","followers_url":"https://api.github.com/users/tvandijck/followers","following_url":"https://api.github.com/users/tvandijck/following{/other_user}","gists_url":"https://api.github.com/users/tvandijck/gists{/gist_id}","starred_url":"https://api.github.com/users/tvandijck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tvandijck/subscriptions","organizations_url":"https://api.github.com/users/tvandijck/orgs","repos_url":"https://api.github.com/users/tvandijck/repos","events_url":"https://api.github.com/users/tvandijck/events{/privacy}","received_events_url":"https://api.github.com/users/tvandijck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-09-16T17:10:49Z","updated_at":"2015-10-05T20:55:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/premake/premake-core/pulls/276","html_url":"https://github.com/premake/premake-core/pull/276","diff_url":"https://github.com/premake/premake-core/pull/276.diff","patch_url":"https://github.com/premake/premake-core/pull/276.patch"},"body":"This is somewhat of a tricky change I guess....\r\n\r\nWhat it does? it adds a os.compile method to premake that takes a lua file and makes a binary lua compiled file out of it... then the embed.lua takes that and converts it into a byte array in the scripts.c.\r\n\r\nIt's pretty straightforward, and the benefits are that the embed.lua now implicitly does syntax validation. invalid lua doesn't compile, so it won't embed. where previously it just takes the source code and premake give you an error that it can't find the file, instead of a proper error.\r\n\r\nin addition, it reduced startup times for us, its not that much, but less parsing, is less time spend, every bit helps in our case...\r\n\r\nThe biggest benefit however is, we're not stripping debug information from the bytecode, so all errors have full and correct file&line information even in a release build...\r\n\r\nthat said, the bytecode turns out to be slightly bigger then the stripped lua text, which is quite amazing to me, but so be it."},"comment":{"url":"https://api.github.com/repos/premake/premake-core/issues/comments/145665746","html_url":"https://github.com/premake/premake-core/pull/276#issuecomment-145665746","issue_url":"https://api.github.com/repos/premake/premake-core/issues/276","id":145665746,"user":{"login":"starkos","id":249247,"avatar_url":"https://avatars.githubusercontent.com/u/249247?v=3","gravatar_id":"","url":"https://api.github.com/users/starkos","html_url":"https://github.com/starkos","followers_url":"https://api.github.com/users/starkos/followers","following_url":"https://api.github.com/users/starkos/following{/other_user}","gists_url":"https://api.github.com/users/starkos/gists{/gist_id}","starred_url":"https://api.github.com/users/starkos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starkos/subscriptions","organizations_url":"https://api.github.com/users/starkos/orgs","repos_url":"https://api.github.com/users/starkos/repos","events_url":"https://api.github.com/users/starkos/events{/privacy}","received_events_url":"https://api.github.com/users/starkos/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T20:55:02Z","updated_at":"2015-10-05T20:55:02Z","body":"Based on the earlier discussion, it sounds like bytecode is probably the way to go. There are no more weird fat-binaries-with-different-endian-architectures any longer. The switch isn't a bad idea, but would it make sense to reverse it, and embed bytecode by default?"}}