not familiar with mojo but i got this error when runnig this
(base) root@5240126e613c:~/moxt# ./build.sh main.mojo -o moxt Executing command: ./scripts/mojoc main.mojo -lmoxt -L . -o moxt Included from /root/moxt/main.mojo:5: /root/moxt/base/globals.mojo:52:8: error: 'UnsafePointer[__G, 0]' value has no attribute 'init_pointee_move' ptr.init_pointee_move(__G()) ~~~^ Included from /root/moxt/main.mojo:6: Included from /root/moxt/trade/config.mojo:5: Included from /root/moxt/base/moutil.mojo:4: Included from /root/moxt/base/mo.mojo:5: /root/moxt/base/c.mojo:192:76: error: no matching function in implicit conversion return DTypePointerDType.int8._as_scalar_pointer() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ /root/moxt/main.mojo:1:1: note: candidate not viable: expected at most 0 positional arguments, got 1 from sys import argv ^ /root/moxt/main.mojo:1:1: note: candidate not viable: 'LegacyPointer[SIMD[int8, 1], 0]' value to 'pointer<_stdlib::_builtin::_simd::_SIMD<:_stdlib::_builtin::_dtype::_DType {:dtype si8}, :_stdlib::_builtin::_int::_Int {1}>>' from sys import argv ^ /root/moxt/main.mojo:1:1: note: candidate not viable: failed to infer implicit parameter 'is_mutable' of argument 'value' type 'Reference' from sys import argv ^ Included from /root/moxt/main.mojo:6: Included from /root/moxt/trade/config.mojo:5: Included from /root/moxt/base/moutil.mojo:4: Included from /root/moxt/base/mo.mojo:5: /root/moxt/base/c.mojo:192:76: note: failed to infer parameter #2, parameter isn't used in any argument return DTypePointerDType.int8._as_scalar_pointer() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ /root/moxt/main.mojo:1:1: note: candidate not viable: missing 1 required keyword-only argument: 'address' from sys import argv ^ Included from /root/moxt/main.mojo:6: Included from /root/moxt/trade/config.mojo:5: Included from /root/moxt/base/moutil.mojo:4: Included from /root/moxt/base/mo.mojo:5: /root/moxt/base/c.mojo:210:60: error: no matching function in implicit conversion return DTypePointerDType.int8._as_scalar_pointer() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ /root/moxt/main.mojo:1:1: note: candidate not viable: expected at most 0 positional arguments, got 1 from sys import argv ^ /root/moxt/main.mojo:1:1: note: candidate not viable: 'LegacyPointer[SIMD[int8, 1], 0]' value to 'pointer<_stdlib::_builtin::_simd::_SIMD<:_stdlib::_builtin::_dtype::_DType {:dtype si8}, :_stdlib::_builtin::_int::_Int {1}>>' from sys import argv ^ /root/moxt/main.mojo:1:1: note: candidate not viable: failed to infer implicit parameter 'is_mutable' of argument 'value' type 'Reference' from sys import argv ^ Included from /root/moxt/main.mojo:6: Included from /root/moxt/trade/config.mojo:5: Included from /root/moxt/base/moutil.mojo:4: Included from /root/moxt/base/mo.mojo:5: /root/moxt/base/c.mojo:210:60: note: failed to infer parameter #2, parameter isn't used in any argument return DTypePointerDType.int8._as_scalar_pointer() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ /root/moxt/main.mojo:1:1: note: candidate not viable: missing 1 required keyword-only argument: 'address' from sys import argv ^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:19: /root/moxt/strategies/grid_strategy.mojo:238:37: error: invalid initialization: could not deduce parameter 'type' of parent struct 'Reference' var cell_ref = Reference(self.grid.cells[i]) ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ /root/moxt/main.mojo:1:1: note: struct declared here from sys import argv ^ /root/moxt/main.mojo:1:1: note: function declared here from sys import argv ^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:19: /root/moxt/strategies/grid_strategy.mojo:245:70: error: 'Reference' parameter #1 has 'Bool' type, but value has type 'lifetime<1>' ](inout self, inout ctx: IContext, cell: Reference[GridCellInfo, L]) raises: ^ /root/moxt/main.mojo:1:1: note: 'Reference' declared here from sys import argv ^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:19: /root/moxt/strategies/grid_strategy.mojo:239:17: error: 'GridStrategy' value has no attribute 'on_tick_one' self.on_tick_one(ctx, cell_ref) ~~~~^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:19: /root/moxt/strategies/grid_strategy.mojo:503:41: error: invalid initialization: could not deduce parameter 'type' of parent struct 'Reference' var cell_ref = Reference(self.grid.cells[i]) ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ /root/moxt/main.mojo:1:1: note: struct declared here from sys import argv ^ /root/moxt/main.mojo:1:1: note: function declared here from sys import argv ^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:19: /root/moxt/strategies/grid_strategy.mojo:511:37: error: 'Reference' parameter #1 has 'Bool' type, but value has type 'lifetime<1>' ](cell: Reference[GridCellInfo, L], order: Order) -> Bool: ^ /root/moxt/main.mojo:1:1: note: 'Reference' declared here from sys import argv ^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:19: /root/moxt/strategies/grid_strategy.mojo:504:24: error: 'GridStrategy' value has no attribute 'on_order_cell' if self.on_order_cell(cell_ref, order_opt.value()): ~~~~^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:18: /root/moxt/trade/executor.mojo:94:23: error: 'UnsafePointer[Platform, 0]' value has no attribute 'init_pointee_move' self._platform.init_pointee_move(Platform(config)) ~~~~~~~~~~~~~~^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:20: /root/moxt/strategies/grid_strategy_pm.mojo:238:37: error: invalid initialization: could not deduce parameter 'type' of parent struct 'Reference' var cell_ref = Reference(self.grid.cells[i]) ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ /root/moxt/main.mojo:1:1: note: struct declared here from sys import argv ^ /root/moxt/main.mojo:1:1: note: function declared here from sys import argv ^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:20: /root/moxt/strategies/grid_strategy_pm.mojo:245:70: error: 'Reference' parameter #1 has 'Bool' type, but value has type 'lifetime<1>' ](inout self, inout ctx: IContext, cell: Reference[GridCellInfo, L]) raises: ^ /root/moxt/main.mojo:1:1: note: 'Reference' declared here from sys import argv ^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:20: /root/moxt/strategies/grid_strategy_pm.mojo:239:17: error: 'GridStrategyPM' value has no attribute 'on_tick_one' self.on_tick_one(ctx, cell_ref) ~~~~^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:20: /root/moxt/strategies/grid_strategy_pm.mojo:503:41: error: invalid initialization: could not deduce parameter 'type' of parent struct 'Reference' var cell_ref = Reference(self.grid.cells[i]) ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ /root/moxt/main.mojo:1:1: note: struct declared here from sys import argv ^ /root/moxt/main.mojo:1:1: note: function declared here from sys import argv ^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:20: /root/moxt/strategies/grid_strategy_pm.mojo:511:37: error: 'Reference' parameter #1 has 'Bool' type, but value has type 'lifetime<1>' ](cell: Reference[GridCellInfo, L], order: Order) -> Bool: ^ /root/moxt/main.mojo:1:1: note: 'Reference' declared here from sys import argv ^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:20: /root/moxt/strategies/grid_strategy_pm.mojo:504:24: error: 'GridStrategyPM' value has no attribute 'on_order_cell' if self.on_order_cell(cell_ref, order_opt.value()): ~~~~^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:23: /root/moxt/base/log.mojo:263:8: error: 'UnsafePointer[LogService, 0]' value has no attribute 'init_pointee_move' ptr.init_pointee_move(LogService()) ~~~^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:23: /root/moxt/base/log.mojo:238:35: error: invalid call to 'add': right side cannot be converted from 'Reference[String, 1, e, 0]' to 'StringLiteral' logi("log perform s=" + s) ~~~~~~~~~~~~~~~~~^~~ /root/moxt/main.mojo:1:1: note: function declared here from sys import argv ^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:23: /root/moxt/base/log.mojo:239:35: error: invalid call to 'rpush': method argument #1 cannot be converted from 'Reference[String, 1, e, 0]' to 'String' _ = self.redis[].rpush("q_moxtflow_log", s) ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:23: Included from /root/moxt/base/log.mojo:6: /root/moxt/base/redis.mojo:28:8: note: function declared here fn rpush(self, key: String, value: String) -> Int64: ^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:10: /root/moxt/base/thread.mojo:377:54: error: 'String' value has no attribute 'unsafe_cstr_ptr' rebindDTypePointer[DType.int8], s.unsafe_cstr_ptr(), len(s) ~^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:10: /root/moxt/base/thread.mojo:819:8: error: 'UnsafePointer[LockfreeQueue, 0]' value has no attribute 'init_pointee_move' ptr.init_pointee_move(LockfreeQueue()) ~~~^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:18: Included from /root/moxt/trade/executor.mojo:8: Included from /root/moxt/core/bybitws.mojo:5: /root/moxt/base/websocket.mojo:36:8: error: 'UnsafePointer[Dict[Int, fn() escaping -> None], 0]' value has no attribute 'init_pointee_move' ptr.init_pointee_move(OnConnectCallbackHolder()) ~~~^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:18: Included from /root/moxt/trade/executor.mojo:8: Included from /root/moxt/core/bybitws.mojo:5: /root/moxt/base/websocket.mojo:57:8: error: 'UnsafePointer[Dict[Int, fn() escaping -> None], 0]' value has no attribute 'init_pointee_move' ptr.init_pointee_move(OnHeartbeatCallbackHolder()) ~~~^ Included from /root/moxt/main.mojo:7: Included from /root/moxt/strategies/runner.mojo:18: Included from /root/moxt/trade/executor.mojo:8: Included from /root/moxt/core/bybitws.mojo:5: /root/moxt/base/websocket.mojo:76:8: error: 'UnsafePointer[Dict[Int, fn(String) escaping -> None], 0]' value has no attribute 'init_pointee_move' ptr.init_pointee_move(OnMessageCallbackHolder()) ~~~^ mojo: error: failed to parse the provided Mojo source module mojo version mojo 24.4.0 (2cb57382)
Please update moxt-cpp and update mojo to 2024.7.2805 (ff0e09dc) (nightly) And try again