arcticfox1919 / LuaDardo

A Lua virtual machine written in Dart
Apache License 2.0
172 stars 32 forks source link

luadardo cannot be used in flutter web #28

Open thauschildt opened 11 months ago

thauschildt commented 11 months ago

It seems that luadardo cannot be used with flutter build web. The problem seems to occur when state.openLibs()is called which leads to an error in line 21: static final lua_dirsep = Platform.pathSeparator; in lib/src/stdlib/package_lib.dart.

Error message: Unsupported operation: Platform._pathSeparator.

So due to missing pathSeparator in flutter web, openLibs cannot be used.

Is it possible to get rid of the pathSeparator? It shouldnt be needed as long as only the built-in libs are loaded?!

To reproduce the error: The attached file works fine in linux desktop build, but crashes when deployed and opened on the web.

main.dart.txt