Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7998683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:16:45+00:00 2026-06-04T15:16:45+00:00

In lua, is it possible to serialize functions (without upvalues) and store them WITHOUT

  • 0

In lua, is it possible to serialize functions (without upvalues) and store them WITHOUT USING LOADSTRING ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T15:16:47+00:00Added an answer on June 4, 2026 at 3:16 pm

    You can serialize and store them without loadstring at all – use string.dump. You will only need loadstring if you want to deserealize them back.

    If you need it to reuse actual function later, (and not for some other simple purpose, like comparing), you will still need access to at least string version of loadstring, because that’s the only facility that allows you to evaluate Lua source on the fly.

    If you have it, you may either try:
    1) If you have access, modify Lua engine itself to save source code of function definition somewhere.
    2) Write Lua bytecode to Lua source converter in Lua. With Lua’s simple VM it is not as hard task as it may sound.

    If you have absolutely no access to loadstring at all, you can try to write Lua VM in Lua. That’d be harder task than a simple converter, but still pretty doable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to get destructors in Lua w/o using userdata? http://www.lua.org/notes/ltn006.html looks promising
Is it possible to check if a lua script contains errors without executing it?
Would it be possible using Lua and SWIG and say an IInterface class, to
I am using Lua inside C# WinForms application for GUI automation testing. I want
Is it possible to use Lua with Google App Engine? I recognize that there
Is it possible for a piece of Lua userdata to hold reference to a
Possible Duplicate: “main” function in Lua? In Python, you can check if a script
In lua, for memory allocated with lua_newuserdata, is it possible to register a destructor,
I'm using Lua, already used Google and nothing, can't find way to get string
Is it possible in lua to execute a function from a string representing its

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.