Re: is there something like `stm32-rs` in D?

2018-09-25 Thread Radu via Digitalmars-d-learn
On Wednesday, 26 September 2018 at 03:46:21 UTC, dangbinghoo wrote: hi, https://github.com/adamgreig/stm32-rs looks great, is there something like this in Dlang? thanks! --- dangbinghoo You might take a look at https://github.com/JinShil/stm32f42_discovery_demo and

Re: Can I create static c callable library?

2018-09-25 Thread 9il via Digitalmars-d-learn
On Tuesday, 25 September 2018 at 11:03:11 UTC, John Burton wrote: I need to write a library to statically link into a c program. Can I write this library in D? Will I be able to use proper D abilities like gc? Obviously the public interface will need to be basic c callable functions... I

is there something like `stm32-rs` in D?

2018-09-25 Thread dangbinghoo via Digitalmars-d-learn
hi, https://github.com/adamgreig/stm32-rs looks great, is there something like this in Dlang? thanks! --- dangbinghoo

Re: Can I create static c callable library?

2018-09-25 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/25/18 10:13 AM, Jacob Carlborg wrote: On Tuesday, 25 September 2018 at 12:05:21 UTC, Jonathan M Davis wrote: If you use -betterC, then it's trivial, because your D program is restricted to extern(C) functions and features which don't require druntime. It can also be done without -betterC

Re: Can I create static c callable library?

2018-09-25 Thread Jacob Carlborg via Digitalmars-d-learn
On Tuesday, 25 September 2018 at 12:05:21 UTC, Jonathan M Davis wrote: If you use -betterC, then it's trivial, because your D program is restricted to extern(C) functions and features which don't require druntime. It can also be done without -betterC (and thus with druntime), but it gets to

Re: Can I create static c callable library?

2018-09-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 25, 2018 5:03:11 AM MDT John Burton via Digitalmars-d- learn wrote: > I need to write a library to statically link into a c program. > Can I write this library in D? > Will I be able to use proper D abilities like gc? Obviously the > public interface will need to be basic c

Can I create static c callable library?

2018-09-25 Thread John Burton via Digitalmars-d-learn
I need to write a library to statically link into a c program. Can I write this library in D? Will I be able to use proper D abilities like gc? Obviously the public interface will need to be basic c callable functions... I 'main' is a c program will this work?