Comments (5)
Sounds good. It might take me a day or two, but I'll clean this up and submit a PR
from playdate-nim.
I should add: I'm definitely willing to contribute to make this happen, but I wanted to check if youβre interested first
from playdate-nim.
Yes! There are plans to publish it when the package is stable enough.
As you said however, a specific build configuration has to be used, and I'm not sure it is possible to conveniently "import" and use it as part of the module.
Let me know if you have more info or a solution to this.
Making this a module that you can install and then just works would be awesome!
from playdate-nim.
It can't be a total "install and go", but I think I've got it as hands off as possible:
https://github.com/Nycto/playdate-nim
After a nimble install
, users need to define a bare bones config.nims
:
https://github.com/Nycto/playdate-nim/blob/main/playdate_example/config.nims#L1
And add an include
to the nimble file:
https://github.com/Nycto/playdate-nim/blob/main/playdate_example/playdate_example.nimble#L14
My implementation is still a prototype, but it's enough compile the code and run the simulator.
To get the build targets working in nimble
, I moved the logic into an includable file:
https://github.com/Nycto/playdate-nim/blob/main/src/playdate/build.nim#L83-L96
You can also see the includable config.nim
here:
https://github.com/Nycto/playdate-nim/blob/main/src/playdate/config.nim
It's also worth noting that I moved some of the environment variable definitions into the nimble tasks instead:
https://github.com/Nycto/playdate-nim/blob/main/src/playdate/build.nim#L72-L75
from playdate-nim.
Alright, I think you're on the right path, an include statement should be perfectly fine.
I was trying to see if there's a way to make Nimble execute a package install-time script but I didn't find anything as yet.
Also defining the project name, author and other variables dynamically in Nim is the way to go.
Feel free to make a PR when you think you're ready, I'll progressively make adjustments (if needed) and then publish the package!
from playdate-nim.
Related Issues (20)
- Build for device OS 2.0 error: undefined reference to `_fini' HOT 1
- Does not compile with Nim 2.0.0 HOT 8
- Runtime crashes halt simulator without any indication of problems HOT 6
- Feature: Basic Lua interop HOT 9
- Implement Std/random HOT 3
- api aliases HOT 2
- implement os module HOT 2
- LCD:Sprite.setImage crashes when invoked multiple times HOT 6
- Use `projectName()` instead of static PDX name? HOT 4
- Conflicting types HOT 4
- player volume: double promotion warning HOT 2
- Unclear naming requirement for main entrypoint nim file HOT 2
- arm-none-eabi-gcc: fatal error: cannot read spec file 'nosys.specs': No such file or directory HOT 3
- Any guidance on unit tests? HOT 1
- When importing std/logging, device compilation fails HOT 1
- Mac device Debug builds for device profiling HOT 1
- How to deal with "declared lock level is 0, but real lock level is <unknown> [LockLevel]" HOT 3
- Playdate memory allocator HOT 6
- Update the recommended VSCode Nim extension in the README HOT 1
- sigabrt: double free when calling file.close()
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from playdate-nim.