Replies: 2 comments
-
It seems like jpm would need some changes to make this work. In theory it should just work when an custom |
Beta Was this translation helpful? Give feedback.
-
I was able to get a cosmopolitan jpm hello world project to build, but it required building Janet with cosmo as well. First, to build Janet I needed to remove the
then in the project, set jpm libpath to your Janet
finally, to export to windows:
There will be quirks probably; for example when running the linux-compiled Janet REPL on Windows, it expects modules to have an ".so" extension and won't load dlls |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm trying to use Janet to create APE executables using the cosmopolitan C compiler + libc.
Looking at https://janet-lang.org/docs/jpm.html and https://github.com/janet-lang/jpm/blob/65e218ef55ab2fc601479708cdd9db35d10cfe05//jpm/config.janet#L255-L258 I've attempted to build following the instructions in https://github.com/jart/cosmopolitan#getting-started.
This is what I put in my
project.janet
If I run
jpm build --verbose
I can see that plaincc
is used :(Looking at https://github.com/janet-lang/jpm/blob/3d9d4c410fb64763620c3166c77f6340eae58ded/jpm/declare.janet#L205 I see that
declare-executable
doesn't actually accept:cc
and friends.It looks like I'd need to use
declare-native
for this, but I can see a way to easily get a binary entrypoint instead of a library.If anyone could help me navigate this situation, it would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions