May 31
On 31/05/2021 1:05 PM, Dylan Graham wrote:
> I haven't put any thought into the license. Since LWDR is derived from DRuntime, I assume I'll have to use its license. If not, I'd like to go with something permissive like MIT.

Boost is permissive.
May 31

On Monday, 31 May 2021 at 01:05:03 UTC, Dylan Graham wrote:

>

On Sunday, 30 May 2021 at 17:31:37 UTC, Dukc wrote:

>

On Sunday, 30 May 2021 at 14:28:25 UTC, Dylan Graham wrote:

>

It works by providing a series of barebones API hooks (alloc, dealloc, assert, etc) (defined in rtoslink.d), which you must implement and/or point to your RTOS implementation.

Quickly looking, the implementation looks very portable, save for exceptions. with rtoslink.d, this will probably enable a lot of stuff on any platform without DRuntime. Not just microcontrollers. If I'm right, you just did a BIG service for D on bare-metal.

Exceptions are a nightmare. It works for GDC with GCC code. My codebase uses GCC for its C (ST toolchain), so I need to write some code that can take LDC's exception handling and make it compatible with how GCC operates. So, it looks like there will be multiple exception handling implementations (LDC with GCC backend, LDC with clang backend, GDC with GCC backend). I wish D had something like Zig's error handling.

Otherwise, thank you! It was designed to be agnostic as much as possible. I didn't know it'd help out for more than just microcontrollers :)

Good to see this work come to fruition. First thing I stumbled across was a mispelling of one of the RTOS hooks.

Regarding exceptions, apart from one small detail I'd have thought that GDC and LDC would be compatible, as both just use libunwind. Said small detail are the name of the entry-points for the "throw" and "personality" routines. Both of which can be sorted out trivially with some stubs to forward from one to the other.

extern(C) void _d_throw(Throwable o) { return _d_throw_common(o); }
extern(C) void _d_throw_exception(Throwable o) { return _d_throw_common(o); }

extern(C) void _d_throw_common(Throwable o)
{
   pragma(inline, false);
   // Implementation here: tail merging should take care of the entrypoints.
}
May 31

On Sunday, 30 May 2021 at 14:28:25 UTC, Dylan Graham wrote:

>

Github: https://github.com/0dyl/LWDR
DUB: https://code.dlang.org/packages/lwdr

[...]

Well done sir!

Keep it up ☀️

May 31
On Monday, 31 May 2021 at 01:16:46 UTC, rikki cattermole wrote:
>
> On 31/05/2021 1:05 PM, Dylan Graham wrote:
>> I haven't put any thought into the license. Since LWDR is derived from DRuntime, I assume I'll have to use its license. If not, I'd like to go with something permissive like MIT.
>
> Boost is permissive.

Checked it out. I'm happy with it. I committed the Boost v1 license to the repo.
May 31

On Monday, 31 May 2021 at 11:16:01 UTC, Iain Buclaw wrote:

>

Good to see this work come to fruition. First thing I stumbled across was a mispelling of one of the RTOS hooks.

I'll get on it!

>

Regarding exceptions, apart from one small detail I'd have thought that GDC and LDC would be compatible, as both just use libunwind. Said small detail are the name of the entry-points for the "throw" and "personality" routines. Both of which can be sorted out trivially with some stubs to forward from one to the other.

It was a while ago I was messing with exceptions. I can't remember the errors specifically. I'll give exceptions another go today and report my findings.

May 31

On Monday, 31 May 2021 at 15:41:12 UTC, Imperatorn wrote:

>

On Sunday, 30 May 2021 at 14:28:25 UTC, Dylan Graham wrote:

>

Github: https://github.com/0dyl/LWDR
DUB: https://code.dlang.org/packages/lwdr

[...]

Well done sir!

Keep it up ☀️

Thank you :)

Next ›   Last »
1 2