plugin_bit free or service ?


I’m just starting out with solar2d; and really enjoy it so far, amazing work ! I would like to use some bit operators (, bit.lshift, …) I found out it is not included in the base install, but a plugin is required. I think this fits exactly what I need :

Sadly If I add the require and the settings to my project I still get an error that this plugin is not found; Can I download this ? I found on the web this was originally “the Corona bit plugin is only available to Pro subscribers” is this still the case, if so where would I be able to find this ?

Or did I forget a specific step ?

Thanks for help :slight_smile:


When/where do you get the error message that the plugin is not found? I’ve been using it for years, and it still works just fine for me, so I guess that you have some kind of configuration error.

In my build.settings:

plugins = { 
        ["plugin.bit"] =
            publisherId = "com.coronalabs",
            supportedPlatforms = { iphone=true, android=true, osx=true, win32=true }

And then to use it:

local bit = require( "plugin.bit" )

1 Like

Btw, are you running one of the latest Solar2D builds?

Welcome to Solar2D!

Documentation regarding plugins are not up to speed after Corona SDK went fully open source with MIT license and rebranded as Solar2D. Bit is definitely a free plugin at the moment. Plugins that are found at are completely free and you can find more plugins at and .

1 Like

Hey both,

Thanks for the help! I’m using 2020.3619 (2020.9.25).

One major mistake is I put the plugin info in the config.lua file; :thinking: I now moved it to building.settings; But I get the same issue; I run my game in Solar2D Simulator; (I assume this is fine ?) (or do I need to build it to test ?)

My code :

-- main.lua
local composer = require( "composer" ) 
local bitLib = require( "plugin.bit" )

-- Hide status bar
display.setStatusBar( display.HiddenStatusBar )
-- Seed the random number generator
-- math.randomseed( os.time() )
math.randomseed(os.clock()*1000) -- os.time() is to easy
-- Reserve channel 1 for background music
audio.reserveChannels( 1 )

-- Reduce the overall volume of the channel
audio.setVolume( 0.5, { channel=1 } )

-- Go to the menu screen
-- composer.gotoScene( "game" )

I uncommented the last line just to show that even before the goto, it generates this error;

Thanks for helping.

The simulator is fine, no need to build for device to get this to work.

What does you build.settings file look like?

And what is the plugin_bit that is shown in error message?

Seems strange that it doesn’t work. I’m almost always working on Mac, but I haven’t had any problems building on Windows either.

1 Like

Okay somehow it kinda works, I believe this had something to do with “plugin_bit” and it had to be “plugin.bit”;

I have changed it somewhere and now it does work as intended; Thanks for your help !

Game -dev- on ! :wink:

1 Like