<p>I'm lacking some basic information about cbindings & go. In short, i'm trying to find a library that uses <a href="https://github.com/sass/libsass">libsass</a> to compile Sass, in go. In the libsass <a href="https://github.com/sass/libsass/wiki/Implementations#go">implementations wiki</a> there are 4 implementations listed.</p>
<p>So far, go_sass is the only one i've gotten to work - and that's because it comes with everything (including a libsass installer), but most importantly the interface files. The downside to this one, is that it only works on a specific version of libsass. If the user who is building the Go code has a different version, go_sass will fail.</p>
<p>gosass and go-sass <em>(i'm going by memory here)</em> both immediately fail with variations of a missing sass_interface file. My attempts to supply one have failed, though i'm likely doing something obvious wrong.</p>
<p>So my question is basically.. what am i doing wrong? I'm likely doing many things wrong heh, but are cbindings this difficult to deal with?</p>
<p>I'm trying to build a library that uses a sass compiler, but more importantly than my problems, it seems to me that anyone who downloads <em>my</em> library, will have a hell of a time simply compiling it due to the cbinding dependencies of go-sass & friends.</p>
<p>So what do you recommend? My main concern is making an easy to distribute library. Will this be possible with cbindings?</p>
<hr/>**评论:**<br/><br/>ackondro: <pre><p>I got fed up with the same situation (and needed a newer libsass) and threw together this library: <a href="https://github.com/acsellers/sassy">github.com/acsellers/sassy</a>. I built the library for a quick prototype that ended up not getting put into production. It's a mishmash of libsass code and go code, though I didn't copy the sass -> scss library that libsass sometimes includes, because of license concerns. Basically I copied the libsass code into the same directory as the go code, then tweaked the go code to use the embedded libsass. So you should be able to just go get ... without having to install libsass as a shared library or whatever.</p>
<p>It's not the prettiest library, but it was convenient enough at the time. I'm not sure I would use it today, instead I would probably end up going with <a href="https://github.com/yosssi/gcss">gcss</a> if I wanted sass-type features in Go.</p></pre>xyproto: <pre><p>I second that. I'm using GCSS in <a href="https://github.com/xyproto/algernon" rel="nofollow">Algernon</a> and it works really well. </p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传