LiteLDev / LeviLamina

A lightweight, modular and versatile mod(plugin) loader for Minecraft Bedrock Server BDS, formerly known as LiteLoaderBDS
https://levilamina.liteldev.com/
GNU Lesser General Public License v3.0
1.05k stars 112 forks source link

[Proposal]: Support BDS-Linux #1442

Open Redbeanw44602 opened 5 months ago

Redbeanw44602 commented 5 months ago

We are planning to add support to the linux version of bedrock dedicated server.

Preconditions

We need perfect c++ header files generated from Win-BDS because the name mangling standard defined in the itanium c++ abi does not contain a complete declaration. The current header is close to perfection, but it has some shortcomings, such as some virtual functions are unknown or the order is incorrect. This problem also affects: #1041 #1429 .

Making cross-platform

These are just some expected problems that need to be solved, and may be revised frequently in actual operations.

Redbeanw44602 commented 5 months ago

BDS: Performance between WIN and LINUX

We did a small experiment to evaluate the performance of bds under linux and windows.

Environment

Experiment

We created 4096 TNT (from 0,0,0 to 15,15,15) and detonate it at the same location (0, 15, 0). To avoid chance, we conducted the experiment three times under the same environment, the result is as follows:

System First(s) Second(s) Third(s) Average(s)
Windows 57.3 58.2 57.1 57.5
Wine 55.9 51.9 52.2 53.3
Linux 69.3 72.1 71.3 70.9

It can be seen that the time required for BDS to complete the 4096 TNT explosion calculations under linux is more than ten seconds longer than that under windows(not wine).

Possibility

This is just a simple performance test. It does not reflect all the performance of BDS on different platforms, but it is also representative to a certain extent (TNT explosion involves calculations of various systems). The reason for this situation may be due to the compiler optimization level when BDS uses clang to generate executable files suitable for linux.

YueHua46 commented 5 months ago

我很需要这个支持

Mih4n commented 3 months ago

It will allow people to create more servers on levilamina because of cost of the servers. Windows server 4 or more times more expensive than linux server, depends on hosting service. Yeah we have docker image that runs under wine but there a lot of restrictions such as uv_pipe_opened problem on node js and the size of image is really big.

Sorry for my English)