Comments (9)
I haven't done anything with go modules yet. From what I had read, I believe you are right that the generated imports will need to include the module name. I anticipate having a switch on psgo
to enable/disable use of modules.
from purescript-native.
I've been looking into modules now, and believe I have something working the way I'd like, although it might still need some tweaking. If you are pretty familiar/comfortable with go modules, you can try building psgo
out of the golang-modules
branch. If not, you can wait until I release it and provide instructions. However, the main "quick start" difference is that you don't need to manually clone purescript-native-go-ffi
anymore.
Based on what I've been reading, I'm not sure I'll support both a GOPATH
and modules mode, but I'll continue to give it some thought.
from purescript-native.
The latest version of psgo
now uses Golang modules instead of GOPATH: 57f696b and (release 2019-08-12).
from purescript-native.
That's great @andyarvanitis , can't wait to get a chance to try it out.
from purescript-native.
Great, thanks. I'll leave this open until at least you've had a chance to try it. I also need to add some documentation on how to do custom FFI.
from purescript-native.
Successfully built a "hello world"!
I did have to include two replace
directives in my toplevel go.mod
:
module github.com/pmahoney/example
replace purescript-native/output => ./output
replace purescript-native/ffi-loader => ./purescript-native
Is that expected? Seems reasonable enough.
Thanks, this is great; looking forward to doing something beyond "hello world"!
from purescript-native.
from purescript-native.
I made it a little more robust now. If you had already created a go.mod
in your working directory, it will still add those replace
directives (it now uses go mod edit
commands). The latest code in branch golang
has this change, but I haven't updated the prebuilt binaries yet.
from purescript-native.
2019-09-02 prebuilt binaries have this fix, so closing
from purescript-native.
Related Issues (20)
- ObjectUpdate seems to need deep copy HOT 2
- Cannot find ls/ls.h and rs/rs.h HOT 2
- Incorrect equality check in Data_Interval_Duration_Iso HOT 3
- Returning a constant from the ffi HOT 7
- "attribute 'haskell-nix' missing" when building with nix HOT 3
- error building purescript-dotlang HOT 16
- Support spago alternate entry point option
- ffi array type interop with opaque types HOT 7
- zero-fill shift right operator doesn't exist HOT 11
- pass arguments to run HOT 2
- stack nix integration HOT 1
- Problems with nix toolchain HOT 9
- Consider combining executables (and specify backend with switch) HOT 5
- un-gitignore cabal files HOT 2
- cpp binary size HOT 4
- Update to PureScript 0.14 HOT 5
- Webassembly / Emscripten with C++ HOT 1
- Upgrade to Latest PureScript Version
- Backend "psgo" exited with error:1 HOT 2
- go module initialization HOT 3
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 purescript-native.