Coder Social home page Coder Social logo

rust_lang_cn's Introduction

rust_lang_cn

China Community for Rust lang

如何运行

如果要在本地搭建Rust China测试环境,请参见以下步骤:

  1. clone本仓库到本地
  2. 初始化MySQL数据库,创建rust_lang_cn数据库,创建各数据表,建表语句见tables.sql
  3. 拷贝config-sample.toml至config.toml,修改其中的数据库配置
  4. 拷贝log4rs-sample.yaml至log4rs.yaml,可以不用修改
  5. 配置并运行静态文件服务器,服务static文件下的静态文件内容,可用Nginx或者简单地用python -m SimpleHTTPServer亦或者php -S 0.0.0.0:8000,并设置好config.toml中的static_path,这个路径应该和你启动的静态资源服务器的资源所在路径相符合。
  6. 编译,执行命令cargo build --release即可
  7. 设置好config.toml中的app_path为:"http:://localhost:3000",然后运行./target/release/rust_lang_cn
  8. 访问http://localhost:3000

如何修改css

  • css采用sass来编写,产生好的css文件在static中:static/css/base.css
  • sass源码在src/sass中,主文件为src/sass/base.scss,其中集成了Bootstrap的sass源码,修改或添加样式只要修改src/sass/base.scss,然后用sass编译输出到static/css/base.css,具体命令如下:

你可以手动编译

cd src/sass
sass base.scss ../../static/css/base.css

使用 gulp 监听自动编译

npm i
gulp

目前已有功能

  • 注册
  • 登录
  • 发表话题
  • 编辑话题
  • 回帖
  • 个人中心
  • RSS
  • 置顶,加精

如何参与

常见问题

  • mac上编译找不到openssl,参见这个issue

rust_lang_cn's People

Contributors

liyuan462 avatar miyogurt avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.